How to vectorize random effects model?

Now that I think of it, you might also look at the more complex model here

It’s hard to tell from your OP given that some folks use different terms for things and it’s the contents of the predictor matrix that actually determine the proper model structure. See here for elaboration.