How do you instatiate a prefab from a string array?

I’ve instantiated prefabs from lists many times, but I’d like to know how to do it with an array.
The array is string and the prefab is a group of text items with a script containing game objects.

public class VehicleIndexScript : MonoBehaviour 
{
	public GameObject ID;
	public GameObject Make;
	public GameObject Model;
	public GameObject Year;
	public GameObject Mileage;

	public void DisplayVehicles(string id, string make, string model, string year,  string mileage) 
	{
		this.ID.GetComponent<Text>().text=id;
		this.Make.GetComponent<Text>().text=make;
		this.Model.GetComponent<Text>().text=model;
		this.Year.GetComponent<Text>().text=year;
		this.Mileage.GetComponent<Text>().text=mileage;
	}

}

Normally, I’d run through the list, make temp variables, then display them as follows:

for(int i = 0; i< List.Count; i++)
		{
			GameObject brObj = Instantiate(BrakePrefab);
			Brakes tmpBrake = BrakeList*;*
  •  	DateTime ServiceDate = tmpBrake.ServiceDate;*
    
  •  	brObj.GetComponent<BrakesScript>().DisplayBrakes("ID:" +ID, "Date of Service: " +ServiceDate, "Service Location: " +tmpBrake.Location,* 
    
  •  	                                                 									"Mileage: " +tmpBrake.Mileage,  "Labor: " +tmpBrake.Labor,  "Brake Brand: " +tmpBrake.BrakeBrand,* 
    
  •  	                                                 									"Brake Price: " +tmpBrake.BrakePrice,  "Which Wheels: " +tmpBrake.BrakeWheels,* 
    
  •  	                                                 									"Brake Purchase Location: " + tmpBrake.BrakePurchaseLocation, "Brake Notes: " +tmpBrake.BrakeNotes);*
    
  •  	brObj.transform.SetParent(BrakeDisplayparent);* 
    
  •  }*
    

This data is coming from a WWW call, so rather than trying to convert it, I want to try to keep it as an array, unless someone knows a way to take that information and put it into a class list.
Thanks!

It’s quite similar to list, although it’s important to know that arrays and lists are different.

To go through an array you can also use for loop.

 for (int i = 0; i < someArray.Length; i++)
{
     var item = someArray*;*

Instantiate(item, transform);
}
Let’s say that we have a prefab called Car and then we have a script (class) called Car on the prefab.
The car prefab would have properties.
Example:
public class Car : MonoBehaviour {

public string Name { get; set; }
public string Brand { get; set; }
public int MaxSpeed { get; set; }
public double Price { get; set; }

}
void SpawnCar()
{
var carPrefab = Resources.Load(“Prefabs/carPrefab”) as Car;
var bmw = Instantiate(carPrefab, transform);
bmw.Brand = “Bmw”; // here you would your string
bmw.MaxSpeed = 160; // and other values
bmw.Name = “Rose”;
bmw.Price = 29.999;
}