Okay, this idea's been eating me from the inside out for days now, I've been puzzling over it, so now I finally decided to put it here to see what you guys thought of it.
Okay, here's how the theory works.
Let's say you're going into a 5x5 patch of grass. In that patch of grass, are what I have designated as Randomly Moving Wild Pokemon Encounter Tiles, or RMWPET. The RMWPET's move around every time you take a step, and of course, if one shifts to the point where you move, that triggers a wild Pokemon battle.
As for roamers like Entei, Raikou, and Mesprit, when they're on your route, they count as Randomly Moving Wild Roaming Pokemon Encounter Tiles, or RMWRPET. If you encounter several other Pokemon, that means the Tile has moved off your Route, and is elsewhere.
If we're talking Legendaries or Interactable Pokemon, they have Special Pokemon Encounter Tiles, or SPET. These Tiles, in cases like Lapras, move around occasionally at their own pace. However, for Pokemon like Ho-Oh, Lugia, and Palkia, these Tiles remain stationary until you either capture, run away, or defeat the Pokemon. They disappear afterwards, and either need an AR code or a event to be cleared for the SPET's to reappear. In Lapras's case, these SPET's may appear at certain times, causing the Tiles to appear. Thus saying, you can capture these Pokemon at those times.
Now, let's move on to the subject of Caves.
In cases like Mount Moon, RMWPETs are placed all within the boundaries, effectively deeming that even if you walk through walls to evade Pokemon, it isn't going to work, because you're going to collide with a RMWPET at some point.
However, in places like Ice Cave in HG/SS, RMWPETs are dispersed the same, but only are triggered on areas you can STOP on. On ice tiles, you cannot stop sliding, so this negates the triggering of a RMWPET. Walking through walls into a icicle on the ice tiles, however, can spawn a RMWPET, as they can be stopped on.
Now, let's talk water. In a 5x5 spot of water, RMWPETs work the same as RMWPETs in caves, only they are dispersed in the water area. Areas OUTSIDE of the water, UNLESS they have grass on them, will NOT have any RMWPETs.
As for Shinies…These are very, very rare RMWPETs, promptly dubbed Randomly Moving Wild Shiny Pokemon Encounter Tiles, or RMWSPETs. As are Shinies, they have slim appearence rates. However, as with Roamer Tiles, these can disappear as you move, as RMWPETs stay in the constant area.
Note: In the Distortion World, the only Pokemon Tile is Giratina, which qualifies as a SPET.
If I missed anything, let me know.