convert to in-memory array for re-initialization, but cap to 5000