Investment into a market is not necessarily iliquid. You can always sell a portion when required (a traditional tax deferred retirement account will incur penalties, so I would not sell from those). Real estate and the like is more of a challenge, because you can't quickly sell on a rainy day.
However, you're right, living within your means and considering investments untouchable is the best way to go. Keep an emergency fund you're comfortable with, and go from there. Don't based that value on feelings and what ifs, instead track your expenditures so you realistically know how much you might need for any given emergency.
And remember that there's not one "investment" - there are many.
Example: We spent the last year and a half budgeting for some home remodeling.
I normally keep my investments in a fairly standard mostly-equities mix (vanguard target 2045 retirement, VTSAX, the usual).
Once we started specifically allocating almost all of our spare cash towards the remodeling plans, I left it:
~10% that was already sitting in BRK.B (VTSAX-equivalent volatility)
~10% that was already sitting in SPY (s&p 500 -- roughly the same volatility)
~5% that I put into VTSAX in January, because I couldn't resist when the market was so far down.
~5% in VFICX (low volatility bond fund)
~40% in VTINX (lower-volatility income-producing)
~30% in my savings account @ 1% (no volatility)
At the worst part of the most recent market volatility, my VTINX was down about 2%, which was annoying but didn't put us out of the running. I left the BRK and SPY alone because it'd been parked there for 9 years and had a lot of long-term capital gains tied up in it that I didn't want to pay last year. The savings account held enough of a buffer to pay big chunks of the construction bills.
The VTINX was my main target for saving-with-some-appreciation. It experiences about 1/3rd the volatility of the broader market and has comparatively lower gains, which was about right for my time horizon.
You can do similar things with your portfolio -- some in savings to buffer monthly issues, some in a lower-volatility fund to handle actual emergencies, and the rest in a high-volatility VTSAX-like fund.
I don't necessarily recommend VTINX, btw: for US taxpayers, it has too much short-term capital gains and interest income if you're holding it for a longer period of time.