多分そのようなもの
NSMutableArray *excluded = [NSMutableArray array];
NSArray *sortedNames = @[@"name1", @"name5", @"name3", /*more names*/ @"nameX"];
NSArray *tmp = [inputArray sortedArrayUsingComparator: ^(id p1, id p2) {
NSUInteger pos1 = [sortedNames indexOfObject:((Person *)p1).name];
NSUInteger pos2 = [sortedNames indexOfObject:((Person *)p2).name];
if (pos1 == NSNotFound && ![excluded containsObject:p1]) {
[excluded addObject:p1];
}
if (pos2 == NSNotFound && ![excluded containsObject:p2]) {
[excluded addObject:p2];
}
if (pos1 == pos2) return NSOrderedSame;
if (pos1 > pos2) return NSOrderedDescending;
return NSOrderedAscending;
}];
NSArray *sortedArray = [tmp subarrayWithRange:NSMakeRange(0, [tmp count] - [excluded count])];