Finally I've found a way to solve it. As long as the values are on one sheet, we can take advantage of the fact, that when the second and/or the third argument to INDEX is an array, the result is an array as well:
It is a bit hackish, but it certainly works and doesn't need any VBA nor addons. And it is fast.