Why are MaskedArrays not supported anymore and is there suggested circumvention?

The main issue is you new model has incompatible shapes with the original one regarding x, and you’re not resampling x.

Your error is similar to sampling a variable x of size 2 and then trying to use that trace in a new model where x is defined with size 3.

Partial observation creates two variables x_obs and x_unobs and in your second model x_unobs has a different shape than the one that’s found in the trace. I’m not sure what your goal was, as sample_posterior_predictive can’t do inference, it can only reuse draws from the trace or draw posterior predictive draws for a variable. In your case these would be prior draws since x does not depend on anything else