Suppose that a set of covariates, $X_i$ follows a distribution that is conditional on another variable, $A_i$, for $i \in \{1, \ldots N\}$ individuals. For example, $X_i$ can be income, and $A_i$ can be age, defined as young, middle-age, and elderly. Then, suppose that we have:
$$ X_i \mid A_i \overset{iid}{\sim} F $$
Then, we say that $X_i$ is only i.i.d. within subsets defined by the age variable. Now let $Y(1),Y(0)$ denote the potential outcomes and $T$ the treatment indicator. Suppose that the joint distribution of the potential outcomes, treatment, and covariates are only i.i.d on subsets defined by $A_i$, such that
$$ (Y_i(1),Y_i(0),T_i, X_i)\mid A_i \overset{iid}{\sim} F $$
This scenario appears to hint at a heterogeneous treatment effect, since the distributions of the variables are potentially different given which age is it conditioned on. In example,
$$ \tau_i = E[Y_i(1)-Y_i(0)] $$
where $\tau_i$ may be different than a single global $\tau$.
In such an example, I am wondering how the unconfoundedness assumption needs to be modified given an observational study. For example, if we assume that the following holds,
$$ (Y_i(1),Y_i(0)) \perp T_i \mid X_i $$
will it be enough to identify $\tau_i$? In other words, if we have the joint distribution specification above, how will identification and estimation of the average treatment effect be impacted?