jagged array in c# from different sized units

I’m trying to do something like this:

from a set of 5 gameobjects from a list, store them in an array on Start and then when the array coordinates are changed (now on cord 0,1 etc) it tells the gameObject in that slot to be active. Each game object carries information about it’s own cell size.

Not really sure where to start with Jagged arrays, have been looking at various examples but nothing really fits my use case.

If anyone could suggest something that is along these lines it would be greatly appreciated. (I’m not a big fan of large generic code and classes that solve the universe, so anything focused to this is more appreciated, kind of why I’m stuck really)

If I understand correctly, you don’t need a jagged array. Since GameObjects (and I assume you have a custom MB class) are reference types, you can have a full 2d array and have 0,0 1,0 2,0 all point to the same GameObject. You would need to add the base location to the each GameObject if you need to remove/retrieve that. When you “add” a GameObject to the array, you just iterate along it’s width/height and fill the appropriate number of array cells with a reference to it.