Question
I'll focus on the example
stream=AudioStream@First@$AudioInputDevices I can do stream@"Properties" to get a list of info about it. How and where is, for instance, stream@"SampleRate" defined?
*Values
The result of Through[Unevaluated@{OwnValues,DownValues,UpValues}@stream] is
{{stream:>AudioStream[alittlebox]},{},{}} so that's not informative.
Associations
FullForm@stream suggests that stream is simply AudioStream@<|"ID"->"blahblah"|>. There's clearly data stored elsewhere.
Boxes
I don't know how to look at the definition the box graphic from above. Is there some way to do this by Unprotecting MakeBoxes and GeneralUtilities`PrintDefinitions or something like that? I suppose the box code which actually contains the numbers would explain a lot.
The string "Audio Input Device" is hardcoded in the box if you expand it. I grepped for it in my installation directory, and found it in SystemFiles/Kernel/SystemResources/MacOSX-x86-64/Audio/ProgrammaticPlayback/AudioStreamBox.mx. It's a binary dump file, so I can't find out much.
I recently edited How to mimic thing["property"] syntax?. It's previous title was basically equivalent to this one, but it's actual question and discussion was more along the lines of reproducing rather than system internals.
Use RemoveAudioStream/@AudioStreams[] to purge the stuff from the system, the function isn't immediately obvious.

stream["SampleRate"]$\endgroup$SubValues[AudioStream]andFormatValues[AudioStream]. As they are only "syntax" wrappers for other functions you can't learn much about the inner workings, but probably this is good enough to understand how you can create something that behaves the same. For the inner workings: this looks much like it is using some library not written in Mathematica which is accessed with the help of a handle identified by the "ID". Investigating symbols in theAudio`AudioStreamInternals`package might give some clues... $\endgroup$GeneralUtilities`PrintDefinitions[AudioStream]and you will see several definitions of the formAudioStream[...][prop_] := .... That is where theSubValuesofAudioStreamare defined. $\endgroup$func, you may, at your discretion, definefunc["Properties"]to be whatever you like. The developers at WRI define it for some objects and not for all. But it has to be defined by your code (or by the internal code in the case system objects. Sometimes it'sobj["Methods"], sometimes both are defined, sometimes both are defined and different.). $\endgroup$