Short version
To manipulate IVs, it's the same thing. Start game at certain time + advance the frame. You will probably want to walk at least 2~3 rounds of 128 steps to produce the shaking spot/cave
To manipulate PID, you need to hit your seed and find a walking pattern that produces the shaking spot/dust cloud. This is pretty much impossible if NPCs are interfering so you have to rely on luck for that. Once you can find a walking pattern that does that, advance the IV-rng frame like usual, go to the grass/cloud and stop. Do 1 chatter, see what you get. Do 2 chatters, see what you get. Repeat until you find out where your PID is starting from. Then manipulate from there.