Stuck on creating and filling an array with a loop