5A engine - I take it as a 1.5L carb or fuel injection?? They came both ways. For USDM Corollas (1990 Corolla is part of the 6th generation model) - they came with 4AF or 4AFE engines. This means that you can use most A-series engines as a possible swap candidate.
The 5A-F was produced in 1987 and the 5A-FE (fuel injected) introduced the same year and ran with the 7th generation Corollas 1995 to 1998 (overseas models only).
It does have a thermostat - should be on the inlet side, right under the distributor. If it is missing - that would be the source of the overheating issue or was removed intentionaly due to some other problem (removing the thermostat causes the cooling system to become inefficient).