eeprom_update_block missing eeprom.h

I already gave you the information you needed, did you investigate anything?
Look at the documentation, that what it is there for. If you don't understand: www.cplusplus.com/doc/tutorial/

Along with the 1,000,000 other pages with information on it. You will find what you need in 5 minutes if you tried.

Use the function eeprom_read_byte, it is easier than blocks, change when you are comfortable with c++.

char arr[] = { 1,2,3,4,5 };

for( int i = 0 ; i < 5 ; ++i ){

  if( eeprom_read_byte( ( uint8_t* ) i ) != arr[ i ] ){
  
    eeprom_write_byte( ( uint8_t* ) i, arr[ i ] );
  }
}

If you want a function, create one, pass an index, read its data, if different write it to eeprom. Simple.