How to get the PID of every window of every process?
You want unix id. Like this...

tell application "System Events" to get unix id of every process


PS: Realize that not all "windows" returned by your original code are visible. So depending what you are trying to do you may want to also look into 

https://stackoverflow.com/questions/14551419/listing-all-windows-of-all-applications

Google will give you other examples...