the very idea of drafting "peasants with pitchforks" is largely fiction. a poor farmer would not be drafted for a medieval army in the first place, so there was really no need for a system to supply arms and armor to untrained, unequipped peasants.
in England, service in the army was determined by the Assize of Arms. this royal proclamation determined what level of equipment that each man was legally required to possess based on his rank and wealth.
"Every knight was forced to arm himself with coat of mail, and shield and lance ; every freeholder with lance and. hauberk, every burgess and poorer freeman with lance and iron helmet..."
if a man was too poor he was excluded from the Assize:
"no one who does not possess [specified level of wealth] is to swear concerning free and lawful men."
this limitation makes sense for multiple reasons:
agriculture was the basis of the medieval economy, so drafting all your farmers could be disastrous. these are people you want to stay working in the fields providing food to your kingdom.
logistics was still rather primitive (by modern standards). to properly equip vast numbers of unarmed peasants with government provided arms and armor would be prohibitively expensive for cash-strapped medieval governments.
untrained peasants were next to worthless on the battlefield. at best they could provide the illusion of superior numbers, at worst they got in the way, failed to follow orders, disrupted other battlefield formations, and contributed to mass chaos and confusion in defeat.
all of these men would need to eat. no medieval commander would want vast numbers of hungry but militarily useless mouths to feed that simply consumed resources and contributed nothing but confusion and delay.