Randomly position gameObjects

Greetings

I am trying to write a script to randomly position “all gameObjects” in an array onto the stage every time stage restarts, using preset locations.

These are the scripts I have so far.

any help will be much appreciated

public class Random_position : MonoBehaviour
{
public GameObject itemToSpread;

public GameObject[] itemsToPickFrom;
public Vector3[] position;

// Start is called before the first frame update
void Start()
{
	for (int i = 0; i < itemsToPickFrom.Length; i++)
	{
		SpreadItem();
	}
}

void SpreadItem()
{
	//Vector3 randomPosition = new Vector3();
	int randomIndex_location = Random.Range(0, position.Length);
	//GameObject clone = Instantiate(itemToSpread, randomPosition, Quaternion.identity);
	GameObject clone = Instantiate(itemToSpread, position[randomIndex_location], Quaternion.identity);
}

 void Pick()
{
    int randomIndex = Random.Range(0, itemsToPickFrom.Length);
	//int randomIndex_location = Random.Range(0, position.Length);
	GameObject clone = Instantiate(itemsToPickFrom[randomIndex], transform.position, Quaternion.identity);	
}

}

Are you trying to pick a random item and set it in a random pos?
Try something like this:

  void Pick()
 {       
     GameObject clone = Instantiate(itemsToPickFrom[Random.Range(0, itemsToPickFrom.Length)], 
     position[Random.Range(0, position.Length)], Quaternion.identity);    
 }

Thanks

I have used that code. It works, only it will repeat items from the array. What I need is to place “all items” in the array in “each” location.