The formation would be tricky.
My initial thought would be to start with the position of the leader, get the direction he's looking (might be unreliable) or the atan2 of the leader to the nearTargets, then figure 90 degrees off from that direction for the "line."
Easiest way, I think, would be to get the total number of units in the group, then loop for each one moving the moveTo position another 10m away from the leader in the direction of the line.
Otherwise, I think you'd have to get the direction of each unit from the leader, figure out left side or right side of the line, and then do a loop in each direction. Once you get the direction to the enemy, loop for each unit figuring out the atan2 from the leader. If the direction is "left" then add to a leftArray, opposite for a rightArray. Then count the units in the arrays, and loops in each direction.
Sorry if this doesn't make sense.