CREATE INDEX `idx_arr` ON `DATA` ((distinct (array {"f1": ((`v`.`val`).`f1`), "f2": ((`v`.`val`).`f2`), "f3": ((`v`.`val`).`f3`)} for `v` in `rec` end)))

to use it in this query:

SELECT r.val.`f1`,
r.val.`f2`,
r.val.`f3`
FROM DATA a USE INDEX (idx_arr)
UNNEST a.rec r

And, although I`ve specified in query to use exactly idx_arr, it still uses primary index.

Index selection is based on predicate (because indexer never index when leading index key is MISSING). Also it validate index hint for qualification to void wrong results. As you don’t have predicate it will not qualify

Pre 7.1

CREATE INDEX `idx_arr` ON `DATA` (ALL ARRAY [r.val.f1,r.val.f2, r.val.f3] for r in `rec` end);
SELECT fltr[0] AS f1, fltr[1] AS f2, fltr[2] AS f3
FROM DATA AS a USE INDEX (idx_arr)
UNNEST a.rec AS r
LET fltr = [r.val.f1,r.val.f2, r.val.f3]
WHERE fltr IS NOT NULL;

7.1+

CREATE INDEX `idx_arr1` ON `DATA` (ALL ARRAY FLATTEN_KEYS(r.val.f1,r.val.f2, r.val.f3) for r in `rec` end);
SELECT r.val.f1, r.val.f2, r.val.f3
FROM DATA AS a USE INDEX (idx_arr1)
UNNEST a.rec AS r
WHERE r.val.f1 IS NOT MISSING