Adds a loop to show an array