Binary Recurrence Sequences A binary recurrence sequence is a recursively-defined sequence of the following form:
$$F(1) = a_1 \\ \vdots \\ F(y) = a_y \\
F(n) = \alpha F(n-x) + \beta F(n-y), n &gt; y$$
This is a generalization of the Fibonacci (\$x = 1, y = 2, a = [1, 1], \alpha = 1, \beta = 1\$) sequence and the Lucas (\$x = 1, y = 2, a = [2, 1], \alpha = 1, \beta = 1\$) sequence.
The Challenge
Given \$n, x, y, a, \alpha\$, and \$\beta\$, in any reasonable format, output the \$n\$th term of the corresponding binary recurrence sequence.
Rules

You may choose for the sequence to be either 1-indexed or 0-indexed, but your choice must be consistent across all inputs, and you must make note of your choice in your answer.
You may assume that no invalid inputs would be given (such as a sequence that terminates prior to \$n\$, or a sequence that references undefined terms, like \$F(-1)\$ or \$F(k)\$ where \$k &gt; n\$). As a result of this, \$x\$ and \$y\$ will always be positive.
The inputs and outputs will always be integers, within the boundaries of your language's natural integer type. If your language has unbounded integers, the inputs and outputs will be within the range \$[-2^{31}, 2^{31}-1]\$ (i.e. the range for a 32-bit signed two's complement integer).
\$a\$ will always contain exactly \$y\$ values (as per the definition).

Test Cases
Note: all test cases are 0-indexed.
x = 1, y = 2, a = [1, 1], alpha = 1, beta = 1, n = 6 =&gt; 13
x = 1, y = 2, a = [2, 1], alpha = 1, beta = 1, n = 8 =&gt; 47
x = 3, y = 5, a = [2, 3, 5, 7, 11], alpha = 2, beta = 3, n = 8 =&gt; 53
x = 1, y = 3, a = [-5, 2, 3], alpha = 1, beta = 2, n = 10 =&gt; -67
x = 5, y = 7, a = [-5, 2, 3, -7, -8, 1, -9], alpha = -10, beta = -7, n = 10 =&gt; 39
JavaScript (ES6), 51 44 bytes

(x,y,z,a,b)=&gt;g=n=&gt;n&lt;y?z[n]:a*g(n-x)+b*g(n-y)


Note that the function is partially curried, e.g. f(1,2,[1,1],1,1)(8) returns 34. It would cost 2 bytes to make the intermediate functions independent of each other (currently only the last generated function works correctly).

Edit: Saved 7 bytes thanks to @Mego pointing out that I'd overlooked that the the passed-in array always contains the first y elements of the result.