I did this the other day and entered TSA at T4. Hard right after security gets you to the corridor going to TBIT. On the way back I stayed airside, quite a walk, 20-30 minutes total in and out, up and down. Didn't see any golf carts.
Also watch the signs as there are also underground corridors to baggage claim which would leave you outside security... these were the original airside access before the above ground access out to the gate "pods" were built.
why deal with T4? Assuming you have precheck, TBIT took 5 min. I actually did this yesterday I was flying united but just entered TBIT to use *A lounge to eliminate the walk one way. With precheck I was through security in 5, and the lounge is a 1 min walk as you know from there and then a one way walk back to T7