Are you thinking of something like a Hilbert curve?
You actually could use a Hilbert curve for a layout of a 2D array and it would have the property that (x,y)'s that are near each other in the Euclidean sense would tend to be near each other in the array; there would be exceptions but generally this would be the case.
Would only work with power of two sized arrays however. Also not sure about the time efficiency of going from index -> (x,y) and (x,y)->index; might be log(n) over the size of the array but not sure.