there's not a very specific syntax in c++ for that, ust create a variable and increment it with each iteration:
auto i = 0;
for ( auto & p : particles) {
float x0 = i * p.x;
float y0 = i * p.y;
float x = ofGetWidth() * ofNoise(time * speed + x0);
float y = ofGetHeight() * ofNoise(time * speed + y0);
p.update(x, y);
i++;
}