New implementation of saving persistent arrays