Blocks are fine but what about writing C arrays?
Given this simplified situation:
CGPoint points[10]; [myArray forEachElementWithBlock:^(int idx) {
Another simple answer which works for me is the following:
CGPoint points[10], *pointsPtr; pointsPtr = points; [myArray forEachElementWithBlock:^(int idx) { pointsPtr[idx] = CGPointMake(10, 20); }];