Random array size

I have an array of blocks. I want it to be with a random size/length when the scene starts.

public GameObject[] blocks;

However if I try random range with an array I get all kinds of errors…

Any suggestions?

@Jaedong

This should work:

GameObject[] blocks;

void GenerateBlocks() {
    int rand = Random.Range(1, 26);
    blocks = new GameObject[rand];
}