NJ 20 is a vital connector between Interstate 80 and NJ 4. It is a divided highway with a "Jersey barrier" down the middle the whole way, except for that intersection. The Jersey barrier is effectively uncrossable on foot. There is a jughandle intersection between 17th and 18th. OP is not trying to cross mid-block.
6 lanes on a paltry 80' right-of-way (should be 240' for that traffic count!) goes to show it's less about "America doesn't care about pedestrians" and more about "way too much road crammed in too small a right-of-way". This is one overstressed piece of road; it's not usually this hard. And they crammed the Micro Center on some barely-accessible land on the far side.
First, to address a few misconceptions
Under my subconsciousness, (1) I assumed it is always allowed to cross right in front of traffic at all directions, unless there is a sign telling do not cross here.
No no, the duty to avoid an accident falls equally on your shoulders as theirs. At the very least, if you set up a situation where a prudent driver would find it difficult to avoid an accident, that's all on you. And not least, for them it's a ticket, for you it's 50 years in a wheelchair begging for painkillers and barely holding onto a dead-end job because you need the health insurance.
The law gives you some protection, but it's cold comfort to know you're right from your hospital bed. Traffic is people, and they don't behave like robots, and even the robots mow down pedestrians.
When I walked back from the east side to the west, the traffic light suddenly turned green (it was red when I stepped into McLean),
OK, that happened because the signal has loop detectors, so it can sense traffic approaching or waiting, and can quickly flip the light to serve the most needy traffic (so people aren't sitting at a red light for nothing). In this case, since the road is a practical freeway except for this light, I would particularly expect this on the "jughandle" so the thru lanes can stay running whenever the jughandle is not needed. Where loop detectors exist, pedestrian pushbuttons also exist. You really need to push the button. Pushing the button guarantees you a long phase so you can cross.
Sometimes not being able to see or tell traffic lights from certain angles convenient for pedestrians has been a problem for me.
Not just for you; in complex, busy intersections they use Fresnel lenses to aim the traffic lights at the lanes of traffic they control and obscure them from other angles. It's good to be situationally aware of highway signals, but regardless, if you can see pedestrian signs aimed at your crosswalk, those control you.
Now to your questions.
What to do when you're stuck in the middle?
Both cars in the slower and faster lanes were started moving, and I had to walk back to the east side, and was scared by the car in the slower lane fast approaching me. ... Was it a bad decision to walk back? What should I have done when being stuck in front of the middle lane?
You should have run for your life to a safety zone the instant you realized you were losing the light. I.E. when you saw it turn yellow, because you know what happens next. On a highway of that volume/speed, they probably set the yellow lights to 5.5 seconds. Lanes are 12' wide so you needed to move no more than 18 feet. That's an easy walk in that time, but you need to maintain situational awareness.
In the middle of the highway on the both sides of that gap I see a "safety zone" 5 feet wide; not great, but it's an emergency refuge for pedestrians who mess up. If you were crossing in the fairly vast open asphalt area, that would be a serious blunder.
How do I cross properly, then?
I was wondering how to walk across McLean i.e. NJ 20 safely between 18 and 17 St? What signs could I have looked for as crossing instructions?
Your responsibility is to examine the whole intersection carefully.
Once you have done so, you notice a few things about crossing on the south side of the intersection: First it leads nowhere: to an empty balloon of land surrounded by jughandle. No way out except to come back to this intersection. Second, as you approach the light, you are observing its phases. It has two: North-south traffic, and jughandle traffic. All the phases send traffic onto the southbound lanes. There is no phase which leaves southbound lanes clear on the south side. Therefore a south side crossing is inherently stupid, and the only crossing that makes sense is on the north side of the intersection.
Et voilà, what do we see on the north side? Pedestrian pushbuttons and walk signs.
So our sussing out of the intersection reveals "intelligent design" to have pedestrians cross on the north side. Indeed, Google's walking instructions (which you linked) specifically say to use the north side.
So that was easy: cross on the north side.
Would it be better for them to prohibit it as a crosswalk and sign both sides accordingly? Yeah. But they have no place to put warning signs/barrier on the west side because there's a driveway there. That's typical of the east; they don't "dumb it down" for you, you are expected to use your brain and/or know your territory.
Was that even a crosswalk?
The US shares a "model" traffic code that most states copy mostly verbatim with only a few local changes. For instance NYC outlaws right-on-red. It's possible that NJ made a local amendment... but the model code says crosswalks are on every side of every intersection unless marked. As such, most crosswalks are invisible/unmarked.
Having looked at it from every angle on Google Street View, it looks like a legal crosswalk to me.
Unfortunately, people treat invisible crosswalks with about the same respect as they treat invisible viruses. When there is an obvious or marked crosswalk on the other side, drivers tend to disrespect people trying to use the unmarked crosswalk.
When you factor in that the south-side southbound lanes will always be hammered with traffic, and the sight lines for jughandle traffic are just awful, I would flag that crosswalk as "Do Not Use".
Was it legal to use this poor crosswalk? Yes. NJ Law speaks rather clearly on the issue of using a poor route when a better route is available, at 39:4-36.1 and 39:4-32(f) both of which describe what most places call blatant jaywalking. So this would be legal even if it was jaywalking, which it isn't, because this is an unmarked crosswalk. The latter ref's language specifically acknowledges the existence of unmarked crosswalks. 39:4-32(c) places OP in the right, and (e) and (h) support this further; however that is the "cold comfort" I mentioned earlier.