Saves all objects to arrays.