iterating through the array takes care of that naturally:
1 for you, 1 for you, 1 for you…
still three missiles to go, but no more bad guys? Back to the start → 1 for you, 1 for you.
(didnt realize there was more answers above before posting this)