There are some variations, but usually the NPCs get a Leveled Item called "WithAmmo" (i.e. a weapon with ammo). If you go to Items->Leveled Items in GECK and filter on WithAmmo you'll find them.
NPCs do not consume ammunition. So even if they have a machine gun and only 1 round of the correct ammo type they will never run out. So you don't need to give NPCs more ammunition.
Companions are different. When an NPC is your companion they will consume ammunition the normal way. But if a companion is not hired (or fired) they don't consume ammunition, 1 round is enough for them too, just like other NPCs. (Companion NPCs also have their own non-playable weapons and magical ammo that never runs out, but that is a special case, and if they have a playable weapon and ammo they'll use whatever they think is best.)
If it's simply a case of you wanting more ammo to loot from bodies, then edit those "WithAmmo" leveled items and find out what their base Ammo Leveled items are, and edit those base ammo leveled items.
For example: WithAmmo10mmPistolLoot uses the base leveled items Ammo10mm and Ammo10mm75 so you need to edit those two base items and that is sufficient. The base items are also used in containers (including NPCs) on their own, so editing the base ammo lists is probably your best strategy.
To edit them all is a huge amount of work, you'll see when you find out how many ammo items there are. It could be done but it's work. If it's just certain ammo you are interested in you could edit only those particular ones and save yourself a lot of work.
P.S. If it is simply a case of wanting more ammo to loot, Level 8 and Luck 5 will allow you to get the Scounger perk which will more than double the amount of ammo you typically find when looting containers or bodies. You'll see exactly how that works if you look at those leveled lists in GECK.