Hello @Luis Simoes - Thanks for reaching out.
Automation is definitely possible using the API's and ARM templates. We might not have custom scripts available to do so.
Did you take a look at these docs - Create-lab-windows-vm-template
documentation on REST API's - DevTestLab
Hope this helps.
If the above response helped, please "Accept as Answer" so it can be beneficial to the community.