then make the unit that has been found to go to look for more ammo
The major problem is that you can't make a unit to look for ammo... I don't know if there's any action which compels a unit to get ammo at a certain AmmoCrate/AmmoBearingVehicle. Lets wait for the reply of an action expert, then.
Once I had the idea of making a ammo bearer for MG and AT specialists. Adding ammo through the command "this addMagazineCargo ["MAGDESIGNATION",_Amount]" (of course, you should make an addon to make this unit able to carry mags: transportMaxMagazines=<amount>.), would, indeed, add magazines to the unit as if it was an ammocrate. However, when MGN's ran out of ammo, they didn't call or move to this ammo bearer.
The only way you can make it work is using dead units. Regardless of the unit side, an empty mg compels its gunner to get ammo at a deadbody - if it has the same mag type. Nevertheless, notice that this tweak doesn't work for secondarySlot weapons - LAWLauncher, e.g. - and this theorical ammoCrate would be able to carry only a limited amount of mags: 10*256slot (10 M16 or 5 M60 mags, e.g.). In this way, you could create your own invisible already-dead-unit for carrying mags and use a script to place it at the position of your virtual ammo bearer. It would work.
Otherwise, you can also make a script which makes the no-mags unit to move to the nearest ammoCrate, which would have the dead-ammo-bearer beside it, and take the mags.
Now, the scanning script is very simple:
{IF (!(someAmmo _x)) THEN {_x exec "MyReloadingScript.sqs"}} foreach (units (group1+group2+group3...))
~2
Note: the syntax might be wrong at "(units (group1+group2+group3))" as I don't know if you can sum group (just testing that). If it doesn't work (I belive it does) use (units group1 + units group2 + units group3 ... )
Besides, the condition 'someAmmo' (although it exists) may not return the wanted boolean. If you encounter difficulties with it, just:
IF ((_x ammo (magazines _x select 0)) == 0) THEN {...}
Then, the "MyReloadingScript.sqs" would be called and ran foreach units that ran out of ammo. Its settings would depend on the reloading method you want (search ammo or just addmagazine). Therefore, we await your answer for further scripting.