Create Object Inside Array Javascript Length Validation