Thanks for the extra detail! The masks that get created can be either vector or raster masks. If you create a raster mask you can use the brush tool to edit the mask and it’s visibility underneath.
Once you group your layers you will get the folder with the group name on it. Select the group folder and click the “Add layer mask” In you layers panel.
Once you have created the layer mask added, select it and you can then use your paint brush to edit the visibility. You will only have monochrome values to edit with. Black will hide elements and white will show them. You can also paint greys to partially hide elements in the group.
The second you clipped is speaking of a person who will then export that out to (what I am assuming is) a 3D texture and they will be exporting the mask information to become an alpha channel for a 3D texture. He is using masks to edit his layer group to add the extra information that another program will utilize.
In the example screen clip you showed, adding a layer mask could help hide features of the wave layer set so you could quickly create variations to the layer set being edited. That is trying to solve for a very specific request. How I understand the reddit post is that the user predefined his layers and the masking tool is being used to hide parts of the group overlay. But I did not have the take away that was a solution to "painting" on multiple layers. Merely just grouping and masking out the parts of the group.
Could you provide what your end goal is when you say you want to use this type of method? The community here would love to come up with an outside the box solution for it I'm sure!