Send the front most window to back? bring the back to front?

I am reviving a seven year old thread here because I am interested in experimenting with something like this.

In the above example, @JMichaelTX used TextWrangler windows and the OP was about Apple Mail windows.

Is there any solution available that works for a mix of multiple applications on the same screen?

Update: More recent discussion here: Send Currently Active Window to Back