Array, loop with an if statement