Filter an Array with Patterns