Print array function (homework 2)