https://powershellfaqs.com/convert-object-to-array-in-powershell/ has a simpler method.
Use $array = @($object).
I needed to pass the resulting array onto a function, so I changed:
-contents $object
to
-contents @($object)