Or any arbitrary 512 x 512 pixel windows
Arbitrary - no. Constraints such as alignment will always pose a problem to an arbitrary/generic solution.
If D3D12 lets you arbitrarily supply the pitch of a "layout row major" texture (I'm not sure if it does), then yes, you could alias some specific subset of "windows" within the texture.
I didn't find any obvious way to create such a texture view in d3d12 api