This is the same as `untouched_dims = array.shape[:-1]`.