refactor post array population for any amount