You want to break the log likelihoods down into the granularity at which you would do cross-validation. So in this case, it’s almost certainly going to be one log likelihood per ID. The fact that there’s a known covariance structure or other details of the model shouldn’t matter as long as you define the right log likelihood for the examples.
You can find examples in the loo documentation. The general structure will look like this:
generated quantities {
vector[N] log_lik;
for (id in 1:N_id) {
log_lik[id] = ... however you calculate log likelihood per id ...
}
}