When you see something that's unusual, like humans and Vulcans working on a ship together, it doesn't immediately follow that they're from the future. He wouldn't have known that they would someday be allies, that they would someday serve on starships together, and that those ships would have transporter devices...unless he did.
To retroactively throw some ENT continuity into consideration, Vulcans were already in space in this era. He might have more logically surmised that Vulcans had covertly taken some humans from Earth or somesuch.
It doesn't necessarily mean that Gary's aliens had traveled in time, either. His whole mission was based around humans having advanced technologically faster than they had socially, IIRC. It's possible that these alien brains had projected likely courses of future human history. They may have even played a role in shaping that history through agents like Gary Seven.
It's possible that Doohan was on set to read the lines for the other actors to work around.
Regarding Gary's device and the sonic screwdriver...I think both were drawing from a common source, the Bond phenomenon. IIRC, Our Man Flint
(1966) had the title character boasting of the number of covert functions that his pen could perform.