When you index one element from a the result is a scalar, thus the shape error when you are trying to concatenate it with a 1d tensor. You can expand the dimension, or create 2d RVs like
a = pm.Normal(…, shape=(4, 1))
b = pm.Normal(…, shape=(7, 1))