Handle arrays with nil values