Pick rows from array (ndims not known in advance)

Maybe something as simple as adding selectdim(A, 2, 3:4) as another example, below the selectdim(A, 2, 3) it has now?