AI creating a list of enemies and removing when enemy is dead

Telling the ai to remove dead ai from their enemies array