What is the range of values for x and y?
Choose a variable type that fits your requirements, then build on a strategy that uses arrays of that type.
Numeric and text ‘entry’ or serial data streams are the slowest part of your problem - finger or comms speed - so any processing can be done during entry.
Same for output rendering to whatever you want to display or control.
In the middle, once you have chosen your priorities you can just bounce values around in their native format. EEPROM can slow things a little bit, but that can be optimised as noted above.
Where is the dataset coming from, and what is it being used for?
What’s the need for speed?