Hi.
You don't need an intermediate variable.
You can immediately save the array data to local storage.
And when you load a slice from the local storage, load the data into the array.
I see you are comparing the record using a trigen once.
I would advise you to put all these comparisons inside the menu button event.
You press the "menu" button did all the record comparisons, if you need to save the values to an array and then you save that array to the local storage.