Checking list for active objects

I have 15 game objects that act as text highlights added to a list.

public GameObject[] highlights;

I have a function called Submit() and I want to check to see if any of the game objects in the list are active. If any are active at the time the Submit() function is ran, I want it to set them to inactive.
I have this so far, but I am not sure what to call to set them inactive.

bool allInActive = true;
                for (int i = 0; i < highlights.Length; i++)
                {
                    if (highlights[i].activeInHierarchy)
                    {
                        allInActive = false;
                        break;
                    }
                }
                if (allInActive)
                    print (highlights [0]);
                break;

When it runs, I can get it to print highlights [0], but when I say highlights.setactive, it doesn’t give me the setactive option.
Probably a simple fix, but I can’t get it.

highlights is an array, and arrays don’t have SetActive.
hightlights[0] or highlights is a GameObject, which has SetActive.

If you want to set all of them inactive, then in your loop, use highlights.SetActive(false).

@StarManta
Since I need to gave the game objects in a array or list to keep track of them, how do I call the highlights.SetActive ( False after putting them in the list?

I understand each part of your comment above, but confused how to do the last part to items in a list.

Just loop through them (a second time, if you can’t do this during the first loop for some reason), and SetActive on each item within the loop.

if all of them need to be inactive no need to check if they are active.

for (int i=0;i<highlights.Length;++i)
      highlights[i].SetActive(false);