how to write and read arduino due internal flash memory?

This has been a big help!! It kinda works now!! LOL

One thing I had to do was to pre-format the space with zeros. When I flash the blocks are all at max value and it messes with the loops I have. Wasn't sure of the best way to do this so I'm checking the first saved value to see if its larger than 23. That being the largest value in hours to be stored there. And if so clear the whole space.

  uint8_t test = dueFlashStorage.read(4);
    if (test > 23)
    {
    uint8_t MyArray[LEDStructSize];
    
     for (uint8_t i = 0; i < LEDAttributeCount; i++)
      {
        memcpy(MyArray, &LEDChannel[i], LEDStructSize);
        dueFlashStorage.write(4 + (i * LEDStructSize), MyArray, LEDStructSize); 
      }

Also I have another array that has relay attributes. These structures are a different size than the LED ones. I need to store them at the end of the LED attribute space. So would something like this be appropriate for the dueFlashStorage.write command?

for (uint8_t i = 0; i < RLYAttributeCount; i++)
  {
    memcpy(MyArray2, &RLYChannel[i], RLYStructSize); 
    dueFlashStorage.write(4 + ((i * RLYStructSize) + (LEDAttributeCount * LEDStructSize)), MyArray2, RLYStructSize); 
  }

Super helpful guys. Thank you!