I frequently hear 「あれ？」 when people find something that catches their attention, often even when a listening party is not present. It seems to take a similar functionality to 'what?', 'what's that?', or 'huh?'.
Since あれ isn't a 'question word' itself, was this あれ contracted from a longer sentence? The closest I could think of is 「あれはなんだ？」, but I'm unsure. If it isn't from a longer sentence, is there an explanation behind あれ as a question?
Edit: I should have been clearer (I only used the word 'was'), but I am also interested in if it was historically contracted from something.