What they’re suggesting is to use an array to handle your grid and store all possible spawn points in that array (or list since arrays in UE4 are only 1D). When it’s time to spawn, pick a random index from the array and spawn there. To create the array, define the width and height of the grid in variables (max rows & columns), then run two Loops, first on X, then Y (or Y, then X). Example:
For Loop Index=0 through Index=width-1
For Loop Index=0 through Index=height-1
Make Vector (X*100 | Y*100 | Z=0)
Add to Grid]
To spawn, Get a random index from Grid] and use the vector returned as the spawn location.
To prevent spawning to an occupied grid space, use a second array GridUsed]. When a location is pulled from Grid], test if GridUsed] “Contains” that location. If so, choose a different location from Grid]. If it doesn’t exist in GridUsed], then Spawn the actor and Add the location to GridUsed].
Alternatively, instead of storing actual locations in Grid], you could simply use the array index as the grid-space: Resize Grid] using width*height. On a 10x10 grid, the bottom row would be index 0-9, the next row up 10-19, and so on through the top row of 90-99. In this case, you’d handle the spawn location after you Get a random index from the array. If the random index is 46, the location would be: X=46%width, Y=46/width, Z=0. Note that % is Modulo.
Also note that UE4 uses a coordinate system in which Y points East while X points North (or X points East while Y points South).