Create a VM from a Windows Image with 4 Empty Data Disks

{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "identity": {"type": "systemassigned"}, "dependson": ["[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[parameters('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'), "/customscript')]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('keyvaultid')]", "[variables('keyvaultprivateendpointid')]", "[variables('keyvaultprivatednszonegroupid')]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"skipdos2unix": false, "timestamp": 123456789, "fileuris": ["[variables('scriptfileuri')]"]}, "protectedsettings": {"commandtoexecute": "[concat('bash ",  parameters('scriptfilename'), " ", variables('keyvaultserviceendpoint'), " ", variables('blobserviceprimaryendpoint'), " ", variables('azureenvironment'))]"}}}{"condition": "[parameters('deployloganalytics')]", "apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/loganalytics')]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('workspaceid')]", "[variables('customscriptid')]"], "properties": {"publisher": "microsoft.enterprisecloud.monitoring", "type": "omsagentforlinux", "typehandlerversion": "1.12", "settings": {"workspaceid": "[reference(variables('workspaceid'), "2020-03-01-preview').customerid]", "stoponmultipleconnections": false}, "protectedsettings": {"workspacekey": "[listkeys(variables('workspaceid'),"2020-03-01-preview').primarysharedkey]"}}}{"condition": "[parameters('deployloganalytics')]", "apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/dependencyagent')]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('workspaceid')]", "[variables('customscriptid')]", "[variables('omsagentforlinuxid')]"], "properties": {"publisher": "microsoft.azure.monitoring.dependencyagent", "type": "dependencyagentlinux", "typehandlerversion": "9.10", "autoupgrademinorversion": true}}