I would suggest you to use array for the most important things. Save and Load state for example are helpful to save quick checkpoint in the level itself, but then you should remove the save state once the level is done for example.
If for example you you need to remember what item the player took, which door the player unlocked, or some kind of states, use an array and save it as JSON in the local storage. I usually assign the X or Y to the IID of the specific object, and update the array accordingly.
When the player start the game or the level, you would need to just load the JSON from the local storage and push it into the array.
In my opinion, Save and load state should only used for quick savegame and not to store the whole game. So that, even if you update the game, you could eventually detect the update and force the player to start from the beginning of the level.