How do I create a row of Texture2D in Unity with C#?

I am trying to create a downward column of 10 buttons that are all about 20 pixels apart of each other. How do I create such an array and how do I put all the different textures on the different buttons? I have tried numerous things now but I just cant figure out how to use the array correctly.

public Texture2D textures;
int buttonHeight, buttonWidth;

void OnGUI(){

for(int i = 0; i < textures.Length; ++i){
if(GUI.Button(new Rect(0, i*(buttonHeight+20), buttonWidth, buttonHeight), textures*)) Debug.Log("Clicked button " + i);*

}

}
In the above you’ll have to do some extra work to call the correct function when a button is clicked but you know it’s index so that’s not hard.
You could also just write
if(GUI.Button(new Rect(x, y, width, height), texture[index])) DoSomething();
for every button you want to make and just put in all the exact values you want for the y and index values, just make sure that the y values are 20+button height away from the previous one.

are you try SelectionGrid : Unity - Scripting API: GUI.SelectionGrid