Taking the second-lien question first, since it's the one with a real mechanism behind it. A second lien sits behind a first mortgage. If the first forecloses, the second gets paid only from whatever is left after the first is satisfied, and often there's nothing left, so the lien is wiped from the property. That's why non-performing seconds trade so cheap. Buyers of them are betting on equity above the first, or on the borrower wanting to clear the lien to refinance or sell, or on negotiating a settlement. It's a collection business more than a real estate business, and recovery depends heavily on state law about deficiency and on whether the borrower has anything to collect from.
On the minimum: whole non-performing firsts in low-cost markets can list in the 15k to 40k range, and it's easy to find them cheaper on rough collateral. The purchase price isn't the real floor though. Budget separately for a title search (roughly 100 to 400), a broker price opinion or drive-by valuation (100 to 250), servicing setup and monthly fees, and legal. Foreclosure legal and court costs commonly run a few thousand up to five figures depending on the state and whether the borrower contests. Property taxes keep coming due while you wait.
So a 20k note can need 10k of reserve behind it. People get hurt by spending their whole budget on the note and having nothing left to finish the resolution. If the whole amount you can risk is a couple thousand, a fund or a joint venture with an experienced operator is a more honest fit than a note you can't afford to foreclose on.