Filling a 2d Perlin map with blocks?


Hi all, I’m new to Unreal Engine and this is my first forum post.
I’m working on a small 2d procedurally generated map made of squares. I have made a grid and am using Perlin noise to create valleys on this grid. Using this code I can create a 1d map of the valleys. How do I make this 2d? Do I have to write my code 7000 times over?
Thanks.