Welcome!
I think this is “just” a shape error. No need to restructure your model (and certainly no need to consider altering your data).
I think the line that is causing the issue is this:
lbda = pm.Gamma('lbda', alpha=alpha_art[art_idx], beta=beta_art[art_idx], dims=('art', 'pdiff'))
You are asking for a parameter array of dimension ('art', 'pdiff') (2 dimensional), but specifying the parameters of the gamma distribution to be of shape art_idx.shape (1 dimensional). So PyMC doesn’t know how you want to get the 1D vector of alphas and betas to broadcast to the 2D parameter array. PyMC (and PyTensor under the hood) uses numpy broadcasting, so you can use that as a reference. I assume you want something like this?
lbda = pm.Gamma(
"lbda", alpha=alpha_art[art_idx, None], beta=beta_art[art_idx, None], dims=("art", "pdiff")
)