Did we not get a distance attached to each target in the Target menu. Then it should be possible to get this as well in the Action menu, and have them sorted as described. This should hopefully be easy.
But I would like to take it a step further. Have a command in the Action menu, that just says Rearm. AI will then locate the closest source for rearming with the standard loadout for its class (FAK, grenades, magazines, etc.). If this could consider any live Ammo Bearers as well, it would be even better.