Mask baking

I am curious if it is possible to bake one object onto another to get mask of the selected object?

13-12-49 03.03.2020

That’s basically what the option ‘Selected to Active’ does.

I tried to do this with emission material, but the result was really strange even with a minimum Ray distance. Everything seems to be configured correctly, but the result is bad.

13-33-46 03.03.2020

I suppose you don’t want to render the parts that are inside your Suzanne… When baking ‘Selected to Active’, the active geometry is excluded from the ray tracing, so those artifacts result from ‘seeing through’.
A simple way to fix this is to make a duplicate of Suzanne without materials, and add it to the selection set.