You don't have to reconfigure the VM during cloning, it can be an exact duplicate of the last VM. This usually isn't of use in a production environment though.
If you have a common set of customizations, you can use the CustomizationSpec Manager to create a customization and during cloning you can use that customization spec instead of building it all up your self. This can include your example of having all but 2 values the same for example (hostname and ip).
You'll have to modify that script (template2vm.pl) to get the goals you require. From what I saw of the code, it wasn't written to be particularly robust and had some variable scope issues (which we fixed). I didn't review the entire program though, just the parts you had issues with.