You can use the -is operator to check the type to check if it's an array:
$arr = 1, 2
$arr -is [array]
However, it is probably more prudent to check that the object implements IEnumerable, since there are many collection types that are not specifically arrays but are iterable:
$arr = 1, 2
$arr -is [System.Collections.IEnumerable]
Also note that if you assign the result of a cmdlet/function to a variable that can return more than one element, but it only returns a collection with a single element, by default it will be unrolled and assigned as a single value. You can force a returned collection to be evaluated/assigned as an array with one of the following techniques (using Get-Process as an example of this):
$arr = @( Get-Process iexplore ) # ===========> Forces the returned value to be part of a collection,
# even if only a single process is returned.
$arr -is [System.Collections.IEnumerable] # ==> true
or you can use the , notation to force the returned values to be evaluated as a collection as well (you will need to sub-express your cmdlet/function call in this case):
$arr = , ( Get-Process iexplore )
$arr -is [System.Collections.IEnumerable]
If you are checking a generic collection (a collection whose type is defined within the System.Collections.Generic namespace), you can also check against the collection's associated type using System.Collections.Generic.IEnumerable[T] instead, where T is the type of element allowed in the array. For example:
$list = New-Object System.Collections.Generic.List[string]
$list -is [System.Collections.Generic.IEnumerable[string] # ==> true
$e -is [object[]].$e -is [array]will work as well (common ancestor) :)