As in creating a virtual display and mirroring that into a window (instead of mirroring an existing display)? There was an HN post[0] about a piece of software called DeskPad about 8 months ago that does exactly that.
BetterDisplay can also do both, as well as a truckload of other things (some free, some paid).
BetterDisplay can also do both, as well as a truckload of other things (some free, some paid).
[0]: https://news.ycombinator.com/item?id=41800602