This looks a lot like an application of "Einstein-inspired notation operations" (aka einops)
would have helped here. I've been toying with the idea of making a translator from einops notation to PDL slice syntax, but haven't done so yet. I am 100% sure that a pull-request with a PDL::Slices::einops function (with suitable tests, even if incomplete) would be gratefully received :-D
EDIT The future-design of PDL is being explored on this GitHub issue, including a mention of einops, and anyone with ideas would be extremely welcome to contribute!