The order you do the check in will determine whether the correct enemies get picked.
checking "player.x < enemy.x" will NOT pick enemies (it will pick player), so it will affect all enemies.
so swap it around...
"enemy.x < player.x" will pick all (and only) enemies with x less than player. in this case, no "for each" is required.