What is the proof for saying all the compounds-of-an-element (except few), to have the same oxidation number?
This statement is a generalisation. As every generalisation it makes things simpler to remember but even here they give exceptions. Of course, chemists couldn't test all oxygen or hydrogen compounds. The assumption is based on electronegativity of atoms in the "usual" compounds. In OF2 oxygen is not in -2 oxydation state. Also in BH3 hydrogen is not +1. I would not even go as far as "In all the known hydrogen/oxygen compounds". "In most of known" would be enough.