When ARM templates were launched for the first time, they were not feature-rich. It was extremely difficult to iterate and create multiple properties for a resource, since copy was only supported at resource level. The copy element could not be used for the properties of a resource. This has changed over the years, with the addition of new capabilities within ARM templates. Recently, ARM templates added the capability to loop over resource properties, using the copy element.
You should note the special syntax for the copyIndex() function when used alongside property iterations. The copyIndex function takes the name of the copy iteration to distinguish it from the resource-level copyIndex function. Remember, we can have a copy iteration at the resource level and multiple copy iterations at the property level. To distinguish between...