Filters an array and removes null values, casting the resulting array to a specific generic type if specified.
The generic type of the array elements.
The input array containing values of type T or null.
Filters an array and removes null values, casting the resulting array to a specific generic type if specified.