There is a post security bridge at the east end of the terminal that connects the WN and AA sides. It connects the high C gates and the high B gates. I fly both airlines out of Phoenix and will frequently go to the other side to go to certain restaurants.
I would not recommend exiting and reentering the secure area as security waits at PHX are erratic at best.
Walking between the D gates and the high A gates (the longest walk you can do in T4) using the post security bridge and the moving walkways would take about 10-15 minutes at a brisk pace.
I would be OK with doing what the OP is attempting as long as it's not the last flight of the day. If the inbound is on time there's plenty of time.