If you hadn't already chosen your own code as the answer, I would have told you to use the one @Michael Taylor suggested.
But, here's one that takes all that code you wrote and does it all with one much more understandable statement:
$alljobs = (Get-AzRecoveryServicesVault).Id -join ','