Create Empty Object Array Iterator Javascript Function