Can i chose game objects as parts of an array in a script ?

Hey guys i need some help…

I created a 2D array that is 10x10, Now i have to fill those arrays with game objects of a grid that is 10x10.
Grid is create with 100 cells that each use this script. Now i don’t have any easy way to put all this cell in arrays with a script, because the only way (that i know) is to create 100 public gameObject variables. That means i would have to chose each cell for a variable manually with editor. And do that 100 times for each cell with this script. That’s why im looking for a solution within a script. If you know that solution please anwser below. And if you could please don’t be mean, im new to Unity.

Thank you in advance.

The easiest way that I can think of is if you make an empty gameobject and then add the 100 cell objects all as children to the empty object, then add the script to the empty object and use a loop like this:

GameObject[,] cells = new GameObject[10,10]; // the array

void Start()
{
    // not sure what function you want it in, so I'll just put it here
	
	for (int i = 0; i < transform.childCount; i++) // loops through all the children
	{
	    cells[i/10, i%10] = transform.GetChild(i).gameObject;
	}
}