Cmdstan sample() - exclude parameters?

Yes, please!
Is there any hack to achieve this in generated quantities?
Like defining a matrix inside braces that encompass all the calculations?