Generic toggle handler for array-based filters. Adds item if not present, removes if already present.