Re: Avengers 2: Age of Ultron
since Quicksilver and Scarlet Witch are in the film; either Feige or Whedon have hinted that Wanda and Pietro initially "have reason(s) to hate" a team like the Avengers..
Whedon has also stated on record that this Ultron is not the creation of Pym (internet breakage!)..
Since this apparently is Ultron's introduction, it's possible that a Stark-created Ultron is to blame: perhaps it was the prototype to Jarvis, but was discarded by Stark many years ago; a glitch gave it a really aggressive/dangerous personality (and, if loosely based on movie Stark's own brain engrams pre-Iron Man I, why wouldn't it?); but somehow it is released from the 'recycle bin'/storage basement. Tony, being somewhat sentimental with his creations, i.e., the servo dummies, probably didn't want to destroy it outright.
Perhaps the hard drive with Ultron's original CPU was included in all the stuff that went into the ocean in Iron Man 3; from there, maybe some AIM, Hydra or other scavengers retrieve it, then when some scientists tinker around with it, thinking they have devised a counter-weapon to the Avengers that can be replicated and sold to the highest bidders, all heck breaks loose when Ultron's aggressive nature kicks in; Ultron proceeds to give itself (or is given) a tough robotic body (possibly scavenged from the Malibu invasion, or the destroyed remote-armors at the Florida Roxxon facility), then invades and decimates Wanda & Pietro's home country in eastern Europe as a display of its power.
Enter plenty of tension when Fury decides to recruit Quicksilver and the Witch for the team.