I think what you want there is an array or a dictionary. See NSMutableArray and NSMutableDictionary. Even better, though, just use a plain old 2D array, as in the following:
// Allocate 2D array and fill with contents
UIImage*** imgs = (UIImage***) calloc(sizeof(UIImage**),150);
for (int v = 0; v < 150; v++){
imgs[v] = (UIImage**) calloc(sizeof(UIImage*),250);
for ( int u = 0; u < 250; u++ ){
imgs[v][u] = // initialize entry
}
}
// Using elements
UIImage* img = imgs[dim1_idx][dim2_idx];
// Freeing the array
for ( int v = 0; v < 150; v++ ){
for (int u = 0; u < 250; u++ ){
[ imgs[v][u] release ];
}
free(imgs[v]);
}
free(imgs);