I think the game does a good job at subtly preparing you for "unpredictable" moments...like, basically after playing a bit, you develop a sixth-sense more or less. Like I can pretty much guess where a Puzzle Piece will pop up (like when you see a cluster of bananas and you just know that if you gather them all, a Puzzle Piece will appear), I can usually guess what the next obstacle's gonna be, etc. Although, this has backfired...there are a few times where I've come across large groups of bananas placed in clearly difficult positions, spent time gathering them all, only for it not to be a Puzzle Piece spawnpoint.
It helps the game does the usual Donkey Kong route of making the initial hazards recoverable if you screw up, before throwing you in situations where the hazards are life-or-death. Like I recall in one of the first Barrel Cannon stages in Returns, one of the Instant Shoot Barrels is placed so if your timing is messed up, you're simply shot towards a second barrel beneath the screen as a safety net, but still teaching you that certain Barrels instantly detonate. And then as the level progresses, you have to time when you enter these Barrels in order to survive. It's an interesting approach.
Part of it really is in reading the level designer's mind ("if I was a level designer, what obstacle would I throw in next?"), and paying attention to banana placement. Donkey Kong Returns I recall did very well with this, and Tropical Freeze is equally great, although it's really a hard concept to properly describe. If I had the time, I'd probably go through levels individually and document the little moments where I basically felt the game did a good job at "hinting" at what was to come.