I just want to point out that the RPGs killing tanks are typically being fired either at APCs, not tanks, or at T55s (like in the above video) or some such very early tank. T55s have simple iron armor that is pretty much butter to a shaped charge like a simple RPG. Modern APCs are actually much harder to destroy with such an RPG than early tanks, as they use spaced armor, ceramic layers, etc., specifically to make them harder to penetrate with an RPG.
A modern tank is a completely different story. Such an RPG fired at say, an Abrams, would 99% of the time do absolutely zero damage other than making a tiny surface hole and mussing the paint. The larger wire guided missile in the third video above would have no problems taking out modern APCs, but even it could have problems versus an Abrams (or equivalent modern tank). To take out the Abrams, it would need a lucky shot, or be able to hit it in the side or rear.
To make matters even harder for the missile crews, nowadays a few tanks (in the Israeli army for example) are starting to be equipped with active missile countermeasures. Those countermeasures will make tanks 'extremely' hard for single missiles to take out. And unlike the third video above where they shot off several missiles then took their leisurely time to pack up and leave, versus a modern trained army experienced with tank and missile warfare, they would not get off a second shot. They would be engaged with tank fire within seconds of them firing the first missile, very abruptly ending that video. The Israelis learned that trick in 1968.
Mechs would be more agile than tanks, able to take cover more easily. However they would sport 'very' light armor (relatively speaking), likely lighter even than an APC. Very likely armor piercing 50 caliber bullets could defeat their armor. Moreover, despite their ability to lean around corners, they would none the less be 'big' targets. It is perfectly feasible for infantry to carry 50 caliber sniper rifles, and hitting those big targets will be easy even for the untrained. I am 100% convinced that mechs will remain solely within gaming, anime, and movies, and will never be part of an actual military.
Powered armor infantry on the other hand is a very different story. Exoskeleton enhanced armored suits could in theory allow a soldier to wear much better armor and carry heavier weaponry. They will be vastly harder for an ill trained and ill equipped insurgent to deal with. Even modern militaries will find themselves desperately wanting similar powered armor so as to be able to counter their opponents powered armor on an equal footing, else they will find themselves on a very loosing end of the attrition equation.
The design of those powered suits will likely be quite different than how they are typically envisaged by most. Most people see them as being big hulky clumsy systems using motors and gears. Such a suit would never be willingly used by an experienced soldier. The powered armor that will be used will not be larger than say a NASA space suit, and very likely will be even less bulky than that. It will probably have soft armor, not rigid, so as to permit maximum flexibility and coverage. It will be almost as dexterous as an unarmored soldier and not much larger.