Enabled all gameobjects in array

Hi guys
I’ve an array of gameobject and i would you like that when i call a function all gameobject set active(true) or false.
With this code only the first gameobject is active.

public GameObject[] posizioni; for (int i = 0; i < posizioni.Length; i++) { posizioni*.SetActive(true);* *}* **

Yes but i have in another line this " posizioni*.SetActive(false)".*
So it doesn’t work;
Thank You;