Here is what matters: node is in 's subtree if and only if tin[v] <= tin[u] <= tout[v]. Why?
DFS enters before any descendant and exits after all descendants. The interval [tin[v], tout[v]] contains all entry times of nodes in 's subtree. If you store node values at position tin[v] in an array, every subtree becomes a contiguous range. Subtree queries become range queries.