Need help!

i don’t know how to explain this but i’ll try. How do i do a square 20 by 20 which each intersecting points in the square given a specific value so that when an object A is randomly position, we can know it’s exact location? Anyone knows how to do that?