How do I get my enemy to retarget within Random.Range?

I’m building a clone of missile command, and I’m stumped with one aspect. I have a gameobject called GameControl which fires rockets at 1 of 5 cities, so something like this:

int selector;

void FireOne(){

  selector = Random.Range(0,5);


And then I have an array of gameobjects called cities, and I have the rocket target cities[selector]. My question is once a city is destroyed, how do I get the GameControl to ignore the destroyed city without removing the object from the array?

I think something like this would work:

  1. Add a temp List

  2. Add a parameter to the Cityobject to detect wether this city is destroyed or not:

    bool isDestroyed;

  3. Fill your temp List with just the active Cities:

    for(int i = 0; i < cities.length; i++) {
    if(!cities*.GetComponent<CityScript>().isDestroyed) {*

4. Now you have a List with only active Cities and you can select them like this:
selector = Random.Range(0,tempCityList.Count);