Given this input:

```
$values = @(1, @(2, 3), $null, @(@(4), 5), 6)

```

What is necessary to create a clean iteration/pipeline over

```
1,2,3,4,5,6

```

?

Conditions: 

* It should not include `$null` in the output.
* It should result in an empty array even if the input is $null or all of the input's values are $null.

Bonus:

* It should show `[1,2,3,4,5,6]` as the result of `ConvertTo-Json -Compress`
* It should preferably be clean and memorable, i.e. non-byzantine pipe manipulation preferred, no dependency on custom functions, if that is at all possible.

I've seen [Flatten array in PowerShell](https://stackoverflow.com/questions/711991/flatten-array-in-powershell), the solutions there do not seem to fulfill the conditions.