By default, if you render using the Maya software renderer, both the color channels (RGB) and an alpha (mask) channel are generated in the image output. You can also enable the option to include a depth channel.
In the Render Settings window > Common tab > File Output section, select the camera from which you want to render from the Renderable Camera drop-down list, and toggle the following options to include or exclude the alpha or depth channel:
If you prefer to use the luminance information as the alpha, turn on the Alpha Is Luminance attribute (in the Color Balance section of the file texture’s Attribute Editor).
For more information about mask channels, see Color, Mask (alpha), and Depth channels.
By default, if you render using the Arnold for Maya renderer, your image is generated in the .exr format that includes an alpha (RGBA) channel.
For more information regarding the alpha and depth channels, see AOVs, Z Depth AOV, and Cryptomatte.