Gen IV is 3D. Gen V is 3D also.

Gen V's map engine is just a modified version of Gen IV's engine. The changes in Gen V allows rail-based movement rather than grid-based movement, which allows for stuff like multi-directional paths, which is shown off most prominently in Castelia City and surrounding areas. To further make it seem more "3D", Gen V's camera is at a lower angle than Gen IV's camera.

It's a common misconception that Gen IV is "2.5D". Gen IV is full 3D. It has a camera that can be exploited with cheat codes to look just like Gen V (although Gen V will still look better just because it has prettier textures in general). The playing field is made up of a bunch of "sections", each section being a giant square plane with stuff on it. Each "section" is a 3D model. I know this because I'm a member of a ROM hacking forum that has someone who is developing a map editor for the DS games.