Loki will be looking to avoid the wrath of Thanos, following his failure to conquer Earth on the Mad Titan's behalf in the first Avengers movie. As a result, he may conspire with him once more - perhaps acting in the same capacity as Mephisto did in the Infinity Gauntlet comic book arc, where he was sort of Thanos' adviser, before attempting to betray him. This would be the ultimate display of Loki's deviousness, but also the ultimate way to make amends for all of the terrible things he did in previous movies - assuming his double-cross was in order to help the heroes, as oppose to gaining power for himself, that is. Either way, if Loki was to appear in the movie as Thanos' aid, it would be more than likely that his motives were actually to bring the Mad Titan down - as we all know the Asgardian doesn't play well with others.