Not saying that creating military killer robots counts as "trying to do good", however ...
if we're talking about a terminator-like scenario, let's not forget the robots from the movie initially are human-designed military appliances.
Possibly by someone trying to do good. More likely by someone just following their rational incentives. Very few people are 'evil' actors but most follow incentives.
Look at the ransomware and DDOS botnet epidemics though. If these programs were to infect and control self-driving cars all sorts of science fiction level bad stuff could happen.
Evil robots could always be created by evil actors, and there is nothing interesting here.