Hi.
First notice that you are using both the NA and NC cmdlets, is you using ONTAP 9/Cluster mode, use NC only.
Now to fully enjoy the power of PowerShell I would try to avoid recreating new objects, and avoid loops where I can, this allows PowerShell to do it's magic, and use parallelism when issuing a command (depend on the developer of the cmdlet).
The way I did the same script:
$ControllerCredential = Get-Credential
$clustersNames = 'cluster1','cluster2'
$clustersObj = connect-NcController $clustersNames -Credential $ControllerCredential
$MgmtLifObj = Get-NcNetInterface -Controller $clustersObj -Role node_mgmt
$NodesObj = Get-NcNode -Controller $clustersObj
$NodesObj | select Node,Model,NodeSerialNumber,NodeSystemId,Version,@{Label="IP";expression={($MgmtLifObj | ? CurrentNode -eq $_.Node).Address}} | ft
Just for fun I run both scripts for one cluster in Measure-command {....} | ft TotalMilliseconds . The version above did it in 620 Mill, and the one you provided in 733. Not a big difference and I don't know what exactly took there longer (running Get-NcNetInterface twice, building new arrays etc) - but was interesting to check before I commented here.
To be honest, I might have taken two different approaches altogether.
1. try to use ONTAP rest API instead of the PS Module, I didn't see NetApp saying it yet - but I think that will be the standard way going forward, and learning how to fiddle with raw rest API's (in any scripting language) will do very good for your general non-vendor-specific skillset, and technically allow you to use more standardized tools and deployment environments where the ONTAP PS Module cannot be installed (Containers, PS for Linux, CI/CD tools).
2. if you have OCUM/AIUM - use that rest API for faster results (as it's already stores all the clusters data), and a bit more safe as you reading read-only source rather a production cluster .
https://docs.netapp.com/ocum-97/index.jsp?topic=%2Fcom.netapp.doc.onc-um-api-dev%2FGUID-6C4A78C2-9F22-4723-B190-FA227CD067FD.html&cp=2_4_2_0