Some investments (like 401Ks and IRAs) withhold taxes until some future time. Most do not. It sounds like you have two goals in mind and they are likely to be better off keeping separate.
However, I was able to take a loan out against my 401K to pay off some debts and it does not make the money taxable because I am essntially borrowing from myself. The downside to this is you have to set up a payment plan like any loan that pays back your 401K gradually and you are not able to earn any interest on your 401K over the time you pay off your loan. So, in theory, you could establish a 401K, use part of it as a loan years later for the down payment on the house, and then pay back the loan to yourself gradually - interest free.
However, you would be smarter (assuming a steady job and a good income), to take out a home loan because the rates there with good credit are often better than you'd get with a loan - plus you improve your credit score as you pay it off.
I miss the old Mile High Stadium.