I have been trying to figure out if it is possible to programmatically resize an NSArray, using code similar to this:
NSArray *resize = [NSArray arrayResized:oldarray size:10];
Which would a new NSArray (Not a NSMutableArray if it is possible) that has the elments after the end of oldarray padded with [NSNull null].
Since NSArray objects are immutable (cannot change the objects they contain) there’s no use in adjusting the capacity of NSArrays.
You could however, write a category that did something along the lines of what you want: