Add logic to persist array items