It should be possible, though looping through the list always is gonna make a liiitttle more lagg, but it shouldnt matter much.
Also one thing that I have seen some aimbots have is that they target monsters with the "shield" effect or whatever made them unhurtable.
Many gods/minions have it always/some time, though I havent used the mod selector so I dont know about that one.
Also lofi, Im having some sort of a nostalgia moment, have you made any clients or something (probably from 2012 march or so), because it feels like something lofi named has been in my rotmg folder, may just be someone else or just a derp in my brain tho.