What you are looking for is something like this:

maybe? Where the X-, Y-Location in the World determine the pattern, but the Z-location is using the Object’s coordinates and when you move an Object, it’s coordinates (in this case only the Z-) stay the same. The Object’s (X- and Y-) Location are the Location of the Origin of the Object, so just single values, so I added the Generated X and Y to that to give some variation in X and Y on the Object itself. You can then use the Vector that comes out of the framed Nodes for whatever you want.
Hope this helps.