Painted.
289 engines were painted after almost complete assembly (similar to all other from Ford) with paper masks covering places that did not get paint. The back plate and flywheel were already in place at the time so back plates only receive paint on the edges and forward side not hidden. Sometimes the back plates didn't get real good paint coverage where the rear of the
oil pan "shaded" the plate from the paint spray gun.
The masks I know about protected areas that coolant hoses would attach, the fuel pump boss,
oil pressure port, exhaust manifold bosses, water pump pulley mount, and the carburetor mount surface. I do know for sure but I suspect masks covered the valve train also.
The pipe plug installed at the time an engine was prepared for Cobra use would have not been painted because it was a custom (non Ford sourced) part use to replace the O.E. vacuum fitting Ford used in Fairlanes.
The water temperature sensors would have not been painted because they were Cobra unique parts installed as new engines from Ford got prepared for Cobra installations.
Most Cobras were sold new with stock Ford induction system. For all those cars the coolant by-pass hose around the thermostat and its special Wittek brand hose clamps were in place when the engines were painted.
The crude installation of a temperature sensor into each
oil pan did not normally seem to be cleaned up and the area spot painted based on the degree of corrosion normally found around the bung fitting.
There are several images of a new yet to be installed engines as used throughout the use of the various HP289 revision levels for Cobras on the Ford website with the Dave Friedman factory photos.