The class method to create an index path with one or more nodes is:
+ (id)indexPathWithIndexes:(NSUInteger *)indexes length:(NSUInteger)length
I did this in 2 lines of code
NSMutableArray *indexPaths = [[NSMutableArray alloc] init];
for (int i = firstIndexYouWant; i < totalIndexPathsYouWant; i++) [indexPaths addObject:[NSIndexPath indexPathForRow:i inSection:0]];
Short, clean, and readable. Free code, don't knock it.
On iOS, you can also use this method from NSIndexPath UIKit Additions (declared in UITableView.h):
+ (NSIndexPath*) indexPathForRow:(NSUInteger)row inSection:(NSUInteger)section
You are correct. You might use it like this:
NSUInteger indexArr[] = {1,2,3,4};
NSIndexPath *indexPath = [NSIndexPath indexPathWithIndexes:indexArr length:4];
You assumption is correct. It's as simple as a C array of NSUInteger. The length parameter is the number of elements in the indexes array.
Arrays in C are often identified as a pointer (in this case NSUInteger *) with a length parameter or a known terminator such as \0 for C strings (which is just a char array).