internal memory ?

'328P, 1284P, 2560, 32U4, all the chips have EEPROM that a sketch can write & read stored values after power loss or reset.
Check out the EEPROM Write Anything library.