Filter an array based stream using a filter function