Create GUI based on an array

Essentially I want to create a function that I can call that creates GUI buttons based on a string array. Some quick code I came up with is as follows:

using UnityEngine;

using System.Collections;

public class Example : MonoBehaviour
{
string buttonName = new string[5];

// Use this for initialization
void Start () 
{

}	
// Update is called once per frame
void Update () 
{
	CreateButtons(buttonName);
}

void CreateButtons(string[] buttonName)
{
	for(int i = 0; i<5; i++)
	{
		GUI.Button(new Rect(200*i, 0, 200, 50), buttonName);
	}
}

}

Anything using GUI-dot function has to be in the event OnGUI. It’s not really an event – it runs every frame. Be sure to use buttonName* and the odd button syntax: if(GUI.Button...) do thing with i.*

using UnityEngine;
using System.Collections;

public class Inventory : MonoBehaviour
{
string buttonName = new string[5];

// Use this for initialization
void Start () 
{

}	
// Update is called once per frame
void OnGUI () 
{
	for(int i = 0; i<5; i++)
	{
		buttonName *= (i+1).ToString();*

_ GUI.Button(new Rect(200i, 0, 200, 50), buttonName);_
_
}_
_
}_
_
}*_