Arrange dried pinto beans on sheet pan or similar and sort, removing any imperfect beans or debris. Rinse thoroughly in cold water. Soak overnight in water & drain in the morning.
In a large covered saucepan, combine beans, water, onion and garlic, bring to a boil. Once boiling, cover and reduce to a simmer for ~2 1/2 hours or until beans are very tender.
In a heavy skillet, melt lard on medium-low heat. Once melted & lightly smoking, add dried chiles de árbol, being careful not to burn them.
Using a slotted spoon, start to add the beans and garlic from the saucepan to the skillet, leaving behind extra liquid and onion. Once all beans are in the skillet, slowly incorporate 1/4 cup of bean liquid, enough to keep the beans moist while frying.
Cook, uncovered, in the skillet over medium heat for ~10 minutes for flavors to meld. Using a masher, mash beans (including the garlic & chiles) thoroughly. They do not have to be perfectly smooth - some texture is desired. Continue to cook for another 5 minutes after mashing, stirring often so the bottom doesn't burn.
Turn off heat & add cheese, stirring to melt and incorporate. Add salt to taste. Serve in a fresh flour tortilla or as a side dish. Makes about 4 1/2 cups.