Random array spawn C#

I am trying to get an object to spawn on start at a random spot. I have made 3 empty game objects for the spots that the object would spawn, and made the object a prefab and connected them to the prefab. here is the full code i have so far in c#

using System.Collections;
using UnityEngine;



public class random : MonoBehaviour {

    public Transform[] spawnLocation;
    public GameObject[] objectToSpawn;
    public GameObject[] spawn;
    int randomInt;

    void Start() {
        spwanSomething();
        randomInt = Random.Range(0, 3);
    }
    void spwanSomething() {
        spawn[randomInt] = Instantiate(objectToSpawn[randomInt], spawnLocation[randomInt].transform.position, Quaternion.Euler(0, 0, 0)) as GameObject;
        spawn[randomInt] = Instantiate(objectToSpawn[randomInt], spawnLocation[randomInt].transform.position, Quaternion.Euler(0, 0, 0)) as GameObject;
        spawn[randomInt] = Instantiate(objectToSpawn[randomInt], spawnLocation[randomInt].transform.position, Quaternion.Euler(0, 0, 0)) as GameObject;

    }
	
}

if you need more info, please let me know.

Thank you

i think this might help you. Ask if you have any questions. You may get problems if you spawnlocations are child Objects. If you have, try to modify this with an Vector3 array.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SpawnAtRandomLocation : MonoBehaviour
{
public GameObject[] objectsToSpawn;
public Transform[] spawnPoints; // An Vector3 array can also be used

public List<GameObject> spawnedObjects; // Containing all spawned Objects; Using List to simply call .Add(GameObject);

public int spawnCount; // How many objects should be spawned

private int objectIndex; // Random objectsToSpawn index
private int spawnIndex; // Random spawnPoints index

private void Start()
{
    // Use this for loop to not hardcode the spawn count
    for (int i = 0; i < spawnCount; i++)
    {
        // For each iteration generate a random index; You could make an int array containing if an object already got spawned and change the index.
        objectIndex = Random.Range(0, objectsToSpawn.Length);
        spawnIndex = Random.Range(0, spawnPoints.Length);

        // Instantiate object
        GameObject go = Instantiate(objectsToSpawn[objectIndex], spawnPoints[spawnIndex].position, Quaternion.identity);

        // Add Object to spawnedObjects List
        spawnedObjects.Add(go);
    }
}

/// <summary>
/// Draws a Sphere at each spawnPoints position
/// </summary>
private void OnDrawGizmos()
{
    Gizmos.color = Color.red;
    for (int i = 0; i < spawnPoints.Length; i++)
    {
        Gizmos.DrawSphere(spawnPoints*.position, 0.5f);*

}
}
}