Reasoning:
If you have many groups/units, to iterate though all takes very long (even with the new groups <side> or nearEntities) - for perFrame execution filtering per SQF is very expensive.
Suggested format:
_leaders = position/object nearLeaders distance; _leaders = position/object nearLeaders [side,distance]; _leaders = position/object nearLeaders [[sides],distance];
Return Value: Array of Units - not sorted
It should also exclude non simulated units/leaders.