This Commented CUE demonstrates how to make sure that a list of concrete, simple values only contains elements that are also present in another list. In other words, how to ensure that one list is a “subset” of another list (even though a list isn’t a set, strictly speaking).

file.cue
package example

_X: ["a", "b", "c"]

A: ["a", "a", "b", "a"]
// A must contain only values in _X.
A: [...or(_X)]

B: ["a", "b", "b", "E"]
// B must be a subset of _X.
B: [...or(_X)]
TERMINAL
$ cue vet
B.3: 3 errors in empty disjunction:
B.3: conflicting values "a" and "E":
    ./file.cue:3:6
    ./file.cue:9:20
    ./file.cue:11:5
B.3: conflicting values "b" and "E":
    ./file.cue:3:11
    ./file.cue:9:20
    ./file.cue:11:5
B.3: conflicting values "c" and "E":
    ./file.cue:3:16
    ./file.cue:9:20
    ./file.cue:11:5