Allow sub/slice to work with fewer indexes than parent ndims

Also add a whole bunch of tests