Arrays are basically just a way to store a lot of values.
If if just want a list of values you can use it as a 1 dimensional array with size (count, 1, 1).
Another common use, like in that tutorial, is to do a 2d array to have a value for every tile on a grid, or one value for every pixel of an image. So size (width,height,1).
Also in that tutorial it uses an array to store a list of the x,y,width and height of multiple rooms. So the size is (roomCount,4,1). 4 because there are four values: x,y,width,height.
You just need to keep in mind what those values mean. So for example you wanted to get the width of the 10th box in that list it would be:
Array.at(10-1, 2).
It’s 10-1 instead of 10 because things count from 0 instead of one. And the 2 is for width. 0:x, 1:y, 2:width, 3:heights.
However, don’t tell me that’s easy to read. It’s rather obscure what it means at a glance.
All that tutorial is doing is:
1: place multiple different sized rectangles on the layout.
2: make paths that go horizontal then vertical between them.
3: draw it to the tilemap. Basically amounts to looping over the tiles under the rooms and paths.
4: once on the tilemap you can check the surrounding tiles to mark the ones on the edge as walls.
4b: in a similar fashion it colors the floor differently depending on what surrounds it.
Using an array instead of a tilemap directly is merely a preference.