thx for suggestions, unfortunately both methods will not work for what I want to achieve with this.
I would like to use that pass as a precise segmentation for Stable Diffusion. Using predefined scene with bunch of layers for different things like Car, Tree etc. with specific colour used by SD. This will allow me to render precise, hi resolution pass quickly, direct in max and will be relatively easy to setup (throwing object to correct layers)
Edit: Ok I had time to actually research my problem and figured a way to do it in max. thx for the help :)