you raise a good question,
my solution was a quick script i wrote earlier today, whereby you make an array containing all the enemy troops that you want to consider taking weapons later when theyre dead,
by passing the name of that array along with the name of the unarmed soldier, the script will first generate a second array containing all those soldiers who have died and still have weapons on their corpses it will then find the closest dead body to the unarmed man then the unarmed man will move to the nearest corpse and take his weapon,
[array of enemies,name of unarmed man] exec "takeweapon.sqs"
_men = _this select 0
_unarmedman = _this select 1
_deadmen = []
_num = 0
#check
_man = _men select _num
?not alive _man && ((count weapons _man)>0):_deadmen = _deadmen + [_man]
_num = _num + 1
?_num!=(count _men):goto "check"
###########################
#find nearest deadbody
_nearesdis = 10000
_num = 0
#check2
?((_deadmen select _num) distance _unarmedman)<_nearesdis:_nearesdis = ((_deadmen select _num) distance _unarmedman); _nearestman = _num
_num = _num + 1
?_num!=(count _deadmen):goto "check2"
_nearestman = _deadmen select _nearestman
_unarmedman domove getpos _nearestman
@(_unarmedman distance _nearestman)<1
_unarmedman action ["take weapon",_nearestman,0,0,(primaryweapon _nearestman)]
apoligies for any typos and any areas of the script which could be done better i knocked it together really quickly