OK. How do blockexplorers work then? Because I found one API, which has this feature. Do they have any backend on the server, that tries to connect every input of a new transaction to its previous output?
They don't use Bitcoin Core, or at the very least, not stock Bitcoin Core. Instead they have their own custom software and databases which parse and index the blockchain data so that lookups are fast. They also do other things which link together things that aren't actually linked in the blockchain, such as "input addresses".