Find a microcontroller from its pin layout

Given that you have changed the question a little bit, I will update my answer to match.

No, Not Directly

Firstly though, I will start with exactly the same sentiment as before despite the comments. No, there is no system which allows you to directly search all the different MCUs/ICs by pin configuration. Such a system would require a huge amount of effort to build a database for and somebody would still have to trawl through all the datasheets to find the information.

The closest you will get is manufacturer part selectors and distributer parameterised searches. However, there are none of these that I am aware of which would get you any closer than saying what ICs are available in 20pin (TSSOP) packages.

You can also use search engines with terms like "20pin TSSOP MCU", and "20pin Microcontroller " and so forth depending on what information you can glean from the IC itself.

Even once you have found possible matches, there are no guarantees that you have found something even remotely compatible. Just as an example, there are PIC MCUs with the same footprint as 7400 logic ICs, which are about as far from each other in compatibility as you will likely get - although I will accept you could possible program an MCU to be a 7400 IC, but not the other way around.

You can also find different ICs from either the same or different manufacturers with the same pin locations as each other for key pins like power - e.g. the ATTiny167 and ATTiny861 - these two are both the same 20 pin package, with the same power, clock and reset locations, but have completely different capabilities (one can generate all the control signals for a BLDC for example, the other can't). So just because you find a match, doesn't mean it is a suitable alternative despite what the comments imply.

There is also no reason to assume that the part is in fact an MCU, or at least a general purpose one. There are discrete ICs that are designed for specific applications (essentially baby ASICs) which would not show up under the microcontroller class - for example TRC1300 is a remote control encoder IC.

In fact this is quite likely in a common purpose mass produced design - by this I mean common applications like a TV remotes where it would not be surprising if somebody has developed a single IC to do all of the interfacing and mass produced it - many cheap products (even expensive ones) would simply use that same IC because the costs would be lower - both in saving of time that would be spent developing firmware for an MCU and doing the hardware designs and also in a cheaper BOM cost.

However, unless you have a part number, and a manufacturers logo, then it is either incredibly difficult, and/or very time consuming to identify the part without trawling through datasheet after datasheet, and even then there are no guarantees that you it is even possible - it could be a custom IC that has no publicly available information.


But, There are Chances

Many ICs can be marked with simplified codes or even not at all, and yet despite all of the odds, it is possible to identify them given enough time. In fact if you look on this site you will find several such examples.

However, there is an underlying theme to the ones that can be found. The amount of information available in marking codes (even if shortened), and crucially how they fit into the circuit. By the latter I don't necessarily mean pin locations, though this in itself can be very useful once you have narrowed down the pool of options, but rather knowing what the circuit is, where the IC is located in the circuit, what function it performs.

As an example, there was a question a while back about identifying a 5 pin SMD IC based on only a 4 digit code. In this case it was possible to identify. Why? well, we could see the full PCB layout and determine what it could be. In that case it had connections to the power rails, yes, but also to a high power LED, and some interesting bias circuitry. From that it could be narrowed down to some form of LED driver with current limiting. Using that information along with the markings, the part was identified.

You've immediately narrowed it down to an MCU. If that is indeed the case, then the next step is to start determining what features are available. Does it have an PWM type pins? Does it have a built in ADC? What communication protocols does it use? This sort of information can narrow down the search for an MCU by allowing you to be more specific when looking through part selector tools.

If you know where the programming pins are for the IC (e.g. an ISP header on the PCB?), you can also gain some clues as to possible manufacturers. For example if the programming header is a 2x3 pin header, it may be an Atmel part. If the header is a 2x5, then it could be a JTAG header. If there are only two programming pins and reset, then it could be a Microchip PIC. These are not givens by any means, but you could stand a chance.

In fact if you can identify the manufacturer and the programming header, you could try common programmers for that manufacturers ICs to try and read any Part ID built in to the IC - many have identifying information accessible via the programming header. But that is only possible if you can make the right connections. If you have a part requiring a HV programmer, this is by no way recommended as sticking high voltage on the reset pin without be 100% sure is a good way of destroying something.

You can also try to identify the part by searching for your device as a whole. There are sometimes common consumer circuits that have had teardowns done where people spend time going through and trying to identify the parts.

In summary, the more information you can gather from the circuitry - about how the part connects to its surroundings, what features it has, markings, and so on - the better your chances. Search engines, distributers, even datasheet catalogues are best places to search for possible matches based in this information. But be under no illusion that it is going to be a straight forward task.


Other Options

There are some other options, which I have neglected thus far. Services exist where you can pay somebody to do a teardown on a device to identify parts. Usually the people offering these services will have connections in the industry that can get them information that you can't find through search engines. I'm not going to name any such services, but they do exist.

There is a massive amount of reverse engineering that goes on within the electronics industry. You can pretty much guarantee that and will be buying each others latest devices and tearing them down to find out what is inside so that they can try to reverse engineer them. But again, these groups tend to have inside knowledge of the industry - direct contact with manufacturers who can supply such information.