Javascript Push Array Elements Into Array Formula With If Statement