Like did they have special people who are great at smithing?, did they gave them money and resources and employed them like workers now? Or were a private smith taking orders and crafting what they required? How they were able to make all of them same?
They weren't made the same. Uniformity didn't catch on until the 1700s, and even then it took a while for the 'replaceable parts' train to get going. There was enormous variety in equipment, even among the same army; generally, in a region, equipment and weapons would tend to be at least similar, to the degree that you'd be able to distinguish armour made 'in the German style' from armour made 'in the Italian style' or 'in the English style'. Weapons would vary in shape and form; Ewart Oakeshott made quite a reputation for himself by, among other things, documenting the evolution of the 'average broadsword' through the centuries. That's just the swords, and just an average; we're talking about an entire continent over centuries, here; anything more specific than 'yep, that's a sword alright' or 'they sure did like swords back then' is going to be awash in 'in this place' and 'at this time' and 'in this place, at this time, among this culture' and 'generally, but not always'.
Fashion has always existed, and it existed in the gear carried by soldiers as well.
^^^^^^^^^.
Medieval economics were roughly capitalist, inasmuch as that if you wanted something, you'd have to pay for it. How you did that, depends; you might swap something, buy it on credit, pay for it with silver, or spend blood to capture it in battle. Who you paid would vary as well; craftsmen tended to have a guild system, in the mid-to-late Medieval periods; for example, in a given town or city, there would probably be an armourer's guild. This would be an organisation somewhat like a combination of a trade union and a professional body. This guild would generally administer the profession of armour-making in that town; its members would be the town's armourers, it would set the standards defining who might call themselves an armourer, and what progression and requirements someone would need to meet to advance in the profession. Sometimes they acted a little bit like a mafia; they'd have a collective monopoly, and would defend it vigorously, and would most certainly not be happy if they thought you were trying to steal their trade secrets.
^^^^^^^^^.
As for another definition of 'produce' -
Some might come with the troops. England, in particular, legally mandated that certain elements of society own and regularly train with longbows. To what degree any particular person might legally 'own and carry' weapons varied wildly from place to place, and what they carried did as well. There is of course a major difference between "legally allowed to carry a sword in a public place" and "legally allowed to own a sword". "Keeping" and "bearing" arms are very different things.
It's my understanding that, in most (medieval) places and times, part of being a 'freeman' - a 'real person' rather than a filthy grubby serf - was being able to fight in war if necessary; often providing their own equipment, to some degree or another.
The 'starterkit' for war, at least inasmuch as the 'early medieval period' goes, was the basic combination of spear and shield, a helmet if you could get one, with mail shirts, hauberks, and swords being a marker that the bearer is a man of particular wealth and importance. Spears, you see, are as useful for hunting as they are in war; a family of any standing at all is almost certainly going to have one floating around the house. Armour and swords, on the other hand, have only one purpose. They might be inherited, or you might have acquired them yourself. Shields were not particularly complex or expensive items; this is valuable, as, given their mostly-wooden composition and their purpose of standing between you and a sharp object being swung in the burly hands of a valiant foeman, they tended to get quite chewed-up. A shield that has seen significant use probably isn't going to become a family heirloom, unless it was taken from the body of an enemy of renown. As far as 'procuring' them goes, I'm not sure. You might make one yourself, or get someone to make it for you, but it's not something a craftsman would specialise in, I don't think; I've heard of swordsmiths, and armoursmiths as well, and no medieval village would be complete without its blacksmith, but I've never heard of a shieldsmith.
^^^^^^^^^^^.
Other gear might be provided by chief or king or colonel, from armouries or storerooms; men come and go, but a well looked-after weapon or article of armour might serve for decades or centuries. Mail may be mended; munitions-grade plate- not the fine form-fitting equipment of a wealthy nobleman, but entirely serviceable and, later on, likely to be bulletproof to some degree or another -may have dents hammered out; a blade, even if of an outdated style, could be bent back into shape; a broken sword might be shortened into a serviceable dagger. It's good steel, after all, it's just that it's missing a few handspans near the end.
Of course, as technology advances- once it becomes expected that armour be capable of resisting a firearm, for instance -outdated articles are going to lose a lot of value; a suit of armour that looks nice or used to belong to someone important might be kept around as a decoration or talking piece, but more mundane items are likely to end up sold as scrap.
^^^^^^^^^^^.
Economics comes into this as well.
As I understand it, hastily conscripted bands of dirt-stained peasants weren't especially common on a medieval battlefield; most soldiers would be either professional or semi-professional fighters or what we'd consider to be 'middle class'. The Sturdy Yeoman Longbowman of English folklore, for example, wasn't a peasant or serf; he was a minor landholder of respectable means, owner of his own farm. As such, he'd be able to afford equipment of reasonable quality. He might also be able to hire a mercenary to carry that equipment to war in his stead, while he stays home and does safer things. Laws about this sort of thing varied.
Further, the cost of equipment changed with time. Early on, during the 'viking years', a sword or mail shirt would be a thing of great value; metal implements in general were costly things, and a sword was a large blade, requiring good steel and skilled manufacture. Later, things became cheaper; iron became more widespread, techniques and technology for working it became better; the 1600s are distinctly post-medieval, but, for reference, it was not unusual for a common soldier of that period to have a helmet, breastplate and sword in addition to his pike. Of course, by that time, you got your gear issued to you.
Part of the trouble with this question is that 'medieval times' really covers an enormous range of times and societies, from migration period tribes to the monarchies and republics of the Reformation.
It is, after all, objectively more difficult to craft a functional (and safe) matchlock arquebus than a spear and wooden shield. And that's before one gets into the topic of what, say, the gunsmith's guild might do to someone who tried to make and sell muskets without paying his dues or completing an apprenticeship under the supervision of a guild member in good standing... (the answer is that they'd sue him. They weren't barbarians back then. Usually.)