N = 8
a = np.arange(N)
b = np.arange(N) - N / 2
result, index = arraysums_recursive((a, b), lower=5, upper=6)
summing all possible combinations of an arbitrary number of arrays and applying limits and returning indices