The most efficient way would be to pick units in a rectangle coming from the hero, but this will make the damage instant which you might not want if you're using a projectile.
A simpler method would be to spawn a dummy unit for the projectile, and use a looping trigger to move it forwards and damage units around it. After a unit has been damaged, add it to a unit group so that it won't be damaged again by this instance.