How to draw shapes in 2.8x from a script - does bgl still work?
BGL still works. The old snippets used fixed function pipeline which is no longer available in Blender since it is running on OpenGL Core profile. Programmable pipeline for OpenGL is actually much easier, more understandable and a more streamlined way to do things. Just use regular modern tutorial for OpenGL to draw a rectangle, make sure that tutorial is using Core profile, and not FFP. 

In order to draw outside the viewport, you need to hook your draw handler to multiple Space sub-types, and determine visibility on what you draw based on the cursor position.

You can use GPU module alongside with BGL (technically it is also an OpengGL wrapper. The only difference is that BGL is a direct 1:1 mapping of OpenGL function calls and GPU module provides a set of convenience classes to automate certain common tasks. But they are still using the same single OpenGL draw context.