Entities with certain behavior types have flags which can be set so that they will jump when the player does (e.g. the Purple Klap-Traps in Loopy Lights), or can ride platforms (e.g. several baddies in Platform Perils). I can't recall how the animal crates are made unsmashable, but I remember encountering this while messing with them before.