How to access object properties in an array?

Greetings all!

I have 50 buttons on the screen. I want to make them visible and invisible in groups. So I have created several different arrays where the objects in the arrays are instances of those same named buttons:

myArray = newArray()
myArray[0] = button1
myArray[1] = button2
myArray[3] = button3
etc… up to button50

How can I change all the buttons’ properties in the array at the same time to ._visible = false ?
I can change them one at a time like this:
myArray[1]._visible = false

But I want to change them all. I tried:
but nothing at all happens.

Please help!

-Brother Gabriel-Marie