This repo and blog posts mentioned below should provide you with the necessary framework to build a VM in Azure via Packer and PowerShell.
Part 2 - https://verticalagetechnologies.com/index.php/2023/06/14/azure-packer-powershell-creating-citrix-golden-images-part-2 (json/HCL)