How to save array of structs in persistence

I’m having trouble in saving the array of structs in persistence. Sometimes it seems to be working and sometimes it doesn’t even save anything.