I think what you need is to define a multivariate distribution and then a custom logpdf for the whole vector.
logpdf
This might be relevant: