I believe you are describing something like this:
https://mrcool.com/u-shaped-window-a-c/
Never used one myself but they are meant to be much better than the ones with ducts - you don't lose so much efficiency from the ducts or from badly patched up window openings.