Making a List of objects and randomize the content

Hi every one, I got this little problem:

// How to make this
GameObject[] toChoose = {Object1, Object2, Object3, Object4... Object10};
// In to this
toChoose = {Object5, Object8, Object2, Object9... Object3};

I try using the Random function but does not work to well, any help will be appreciated.
Thanks in advance.

Do a google search for Fisher-Yates Shuffle. This should yield you plenty of results for randomizing an array.

I’d do something like this, it should theoretically go through each element and assign it somewhere else. Note that there is a possibility that an object does not move.

void RandomizeArray(GameObject[] inputs)
    for(int i=0;i<inputs.Length;i++)
        GameObject buffer = inputs*;*

inputs[Random.Range(0,inputs.Length)] = buffer;