you’re correct. you can’t just put a mask on a lamp and have the image of the mask project clearly anywhere. You’d need to have it as part of a lens assembly, and you’d need to know the distance to the surface/cloud/fog whatever to figure out what kind of lens you need.
Here’s a 1933 story from Popular Science about movie lighting director Otto K. Oleson, who put together a stereopticon projector with a searchlight and sent the image 2,000 feet to light up the side of Hoover Dam with an American flag. The original image was 2.5" square.
I don’t know exactly what he used, but the articles indicate Oleson’s favorite tool was 875 million candlepower portable carbon arc searchlamps.
When I was in high school and teen dance clubs and the old Batman TV show were the rage (mid 60’s), a friend of mine (RIP, Brent) had what I will call a stencil of the bat symbol which he could project onto the ceiling of the club with a pocket flashlight. Everybody though it was cool, but I don’t think it would have gone much farther than that.