Border Array

Hi, anyone have an idea how to set border array ???
Blue numbers should be instead white one …
Thank You

Hi! It depends on you actual problem. For example, what will be this used for?

Take a look at this, there already were some approaches for that:

I need this order to spawn building from vectors.