Use helper function to make print_array_rec easier to follow