Functions/Data/Merge-Array.ps1

Function Merge-Array
{
    [cmdletbinding()]
    Param
    (
        # Input either single or array
        [Parameter(Mandatory=$true,ValueFromPipeline=$true)]  
        $input
    )
    End
    {
        # Unroll
        $input | ForEach-Object {if($_ -is [array]){$_ | Flatten-Array}else{$_}} | where {$_}
    }
}