Advanced Array Filtering in TypeScript: Best Practices