Q:

How should I store a collection of objects and provide specific methods to query them?

I need some advise on the best way to achive the following:

Store a collection of a specific type of objects in order
Custom methods to search the collection
Other custom methods for returning objects from the collection based on some rules
Need instance variables to keep track of things in the collection

Originally I was thinking about sub classing the NSMutableArray class and adding the extra methods and variables that I want that are specific to the objects that I'm going to be storing in the array, but the Apple docs said this was a no no!
I know that you can use Categories but they don't support adding instance variables which I need to keep track of elements in the collection. 
Also I don't want these extra methods being adding to all NSMutableArray objects just my custom one.
What is the best way to do this, the idea is to have a nice wrapper around NSMutableArray to query my custom objects and manipulate them.

A:

Create a class (inheriting from NSObject) that contains a NSMutableArray. Write your own custom add: and remove... methods to add and remove objects from the array.

