So If I understand well your message I can do something like this :
Create a two dimensional array with a width about 100 and a height about 60, then I fill this array with my block X and Y coordinates and I set the block UID at this index.
Then I can do : block pick by UID = (array.at(someX,someY)) ?
And that would work with the expected performances ?
You only need to fill the array with the block UIDs. You choose which array element to set according to the blocks xy position, using something like this:
[attachment=0:znm5miv9][/attachment:znm5miv9]
For performance, as rojo explained you eliminate the need for many (many as in 16 million ) comparisons. Providing this is a desktop game you should be fine, mobiles maybe not.
So it'd be just like working with a tilemap & you'd be using equivalent expressions to tilemap's 'tileToPositionX/Y' & 'positionToTileX/Y'.
tileToPositionX's equivalent would be something like: (array.x * gridsize) + (gridsize/2)
positionToTileX would be like in the image above: floor(block.x/gridsize)