The easiest solution, where you let vSphere handle the parallelism, is to add the -RunAsync switch on the Set-VM cmdlet.
Then the script will not wait till the action is finished, but will continue with the next line in the script.
The vCenter control how many of these tasks can run in parallel.
You can code a limit in your script, but that requires some more coding.
See for example my About Async tasks, the Get-Task cmdlet and a hash table post.
Depending on the vSphere version you are running, that script will require some changes though.