That’s not really what it for. It is for creating overlays with custom Bezels using the Mega Bezel to place the artwork and render the bezel.
Arcade layouts use a variety of screen aspects and positions. There is no easy way to do what you ask. It would , for now, have to be done one by one. I am unfamiliar with the overlay conversion tool suggested on the other thread but unless it creates a core config also, it would still be time consuming. MAME *.LAYs contain coordinates. Retroarch overlay *.CFGs do not.
In the future, HSM is going to try and introduce some “tokens” or “variables” we can use in the image path parameters so that you can have one shader that uses different backgrounds, depending on the rom name.
This combined with some creativity and the use of the Image Placement, Mega Bezel feature, should make it possible.
There are other changes that take precedence, it will probably not happen anytime soon.
I personally think there is no reason to not use standalone MAME with another front end, and use the standard MAME artwork.
If you really want to use the MAME core, since the MAME layouts use the same name as the roms, it should be possible to create game configs for each game using a search and replace tool that supports filename variables. (Such as PowerGREP.) Then use the RA layout feature.