Except 401k, IRAs, 501c3, etc. are categorically different from what I poorly described.
All of those are structured to encourage investment/capital formation by deferring taxes, not avoiding. And they are specifically identified in law (hence names like 401k which refers to section 401, paragraph k of the Revenue Act of 1978).
The trades I am refering to are to allow asset owners to synthetically sell appreciated assets without paying taxes on gains. These trades are not available to any but the ultra-wealthy because they need to be large enough for Wall Street to care.
A classic, simple trade is called "buy, borrow, die". Buy an asset, if it appreciates significantly rather than sell borrow against it in a way that is tied to the price of the asset, then include the asset in your estate so that when you die the basis is marked to market and your heirs pay little to no taxes on the gains, but also don't get the gains because you borrowed against those.
There are many, more clever trades that do not require death.