Ah, okay.
But in my program it makes sense to be able to use any data type and to use sensible names rather than eeprom[row][page][word] so I believe a union of that array and a structure would allow me to use the structured variables in the program and use the addressability of the array when I want to write the data or read it to EEPROM.
The other alternative is to write a pair of functions,
pack and
unpack, that copy the data between global variables and EEPROM.
Because this decouples the long-term storage format from the RAM format, it lets you pick more sensible data types for each variable, and optionally save some room. For example, it makes sense for an often-accessed value to be a full register wide integer, but if it is actually limited to a much smaller range, say -50 to +205, you can actually store it in a single unsigned byte with a fixed offset (-50).
Another benefit from this is in that especially the pack function can compare the data to be stored and the existing data, and make an executive decision whether an update is necessary or not.
However.
On SAMC, the smallest erase unit is one row, or four 64 byte pages; i.e. 256 bytes. Do you really need all those 2048 bits to store your state? If not, then the aforementioned wear leveling thread is applicable.
Basically, if your data fits in 127, 84, 63, 50, 41, 34, 31, ... = floor(256/
n)-1 bytes with
n≥2 (easier if they fit in floor(64/
n)-1 bytes, since write granularity is a page and not a row), and you reserve at least two rows (eight pages, or 512 bytes) of Flash, you
can efficiently reduce the wear on your Flash storage by only erasing the other (next) row when the previous one is full, and using a single additional byte as a sequential counter to indicate which one was written last. (AFAIK, SAMC too allows multiple writes to the same Flash page as long as the previously written data is unchanged. This means that only the 0x00 and 0xFF counter values need to be reserved for erased pages (I can't be arsed to check which one SAMC erases to) for detecting "unused" record slots that can be filled without erasing the page.