develop function to print array in pretty format and populate the array with stdin