you don't need an array at all to achieve this.
int n = 5;
int result = 0;
for (int i=0; i<n; ++i)
{
int t1_new = (2*(t1+t2)) % MOD;
int t2_new = t1;
result = (t1_new + t2_new) % MOD;
t1 = t1_new;
t2 = t2_new;
}
int res = result;
that way, you will get the nth term, and not all of them across the way until n.