bitcoin core – Is the index db downloaded from peers or generated locally?

The only data exchanged over the Bitcoin peer-to-peer network are the raw blocks and transactions. Everything else has to be generated locally from that data.

Litecoin and other forks work the same, as far as I know.

Of course, there could be some client implementations that get other data from other sources (not via the main peer-to-peer network), such as a dedicated server provided by the vendor. Bread Wallet has an example of this. But the Bitcoin Core reference client does not do that.