When the reshoots for Age of Ultron were announced, Loki and Heimdall were also supposed to be added to the final cut of the film - but it didn't happen so, since only Idris Elba's character ended up in Thor's vision. And that was quite a revealing vision, since in a way it pushed the plot of the movie forward, while also setting up Thor: Ragnarok.
But why was Loki cut out of the film? What was he doing there from the first place? Well, Joss Whedon explained this in an interview with Empire Online. Check it out!
Loki poking fun at Thor
As a reminder, the last time when Loki appeared in the MCU he was sitting on the throne of Asgard after, in some way, he took over by impersonating Odin. Here is what Joss Whedon said:
"We even had a little reference to the fact that he's taken the throne, which was Tom (Hiddleston) doing his Anthony Hopkins impression when Thor says, ‘Oh, what would father say?’ Then Tom does his Hopkins impression, and Thor's like, ‘That is uncanny!’ It's sort of like his subconscious is telling him that Loki was imitating his father. But he would never make that connection."
What does that mean, on the long run?
Well, there is no clue to that, other than what is already known, and that is Loki seizing the throne. It is expected for him to return in Thor: Ragnarok, when Thor's vision will (presumably) come to fruition - all the Asgardians will be sent to Hel by his doing. It is also expected that the God of Mischief also has a hand in the fall of Asgard, although it isn't known at this moment.
Also, Loki will appear in Infinity War too - and this further hints that he has set in motion a plan of his own, although it isn't known whether it coincides with the one of Thanos.
In the end, we can say that his removal from Age of Ultron didn't hurt the movie - even if Loki is the best villain to come out from the MCU's stable.