Javascript Loop Over Array Elements All Have The Same