Strangely enough, there are specific exceptions even within those two types that don’t get recycled or cannot be recycled. But the average consumer can’t be expected to know what those exceptions are and should not be forced to recognize those details, so just go ahead and recycle all type 1 & 2 plastics.
The best thing you can do with types 3 through 7 - which, almost without exception, are almost never recycled - is to just chuck them straight into the garbage. They’ll be properly sealed into a landfill where they won’t affect the wider environment.