PowerShell: How can I to force to get a result as an Array instead of Object
Try $x = @(get-aduser)
The @() syntax forces the result to be an array
By the way, the other solutions in this question are not really the best way to do this, for the reasons stated in their comments. A better way is simply to put a comma before the function, like
$result = ,(Get-ADUser -Filter $filter)
That will put an empty result into an empty array, a 1 element result into a 1 element array and a 2+ element result into an array of equal elements.