Identify sub-dimension correlation between 2 variables If we have two variables A={20 values} and B={20 values} and we want to measure the correlation between these two variables. Lets assume that the first n values are highly correlated but the remaining m values are not correlated.
The overall correlation between A and B may not represent the importance of the relationship. Imagine that there is only weak correlation in some values, but several values show really good correspondence between A and B. Traditional correlation coefficients will not capture such relationship.
Is there any measure or statistical method that can detect such relationship between A and B?
 A: This question appears to entertain a methodological misunderstanding. Correlation is a theoretical dimensionless measure of linear association between two random variables, and it depends on their covariance and their variances. There is no such thing as "correlation of values" (i.e. of realizations) of random variables. Only the random variables themselves correlate or not.
Moreover, in order to estimate the existence and magnitude of correlation from a set of data, we have to make certain assumptions. The main assumption is that each realizations-series we have at hand comes from the same random variable, or at least, from identically distributed random variables.
Assume now that we have two such series that we know that come each from r.v. $A$ and r.v. $B$, each of size $n$, which we denote $\{a_1,...,a_n\}$ and $\{b_1,...,b_n\}$. We then break each series in two pieces, with sizes $m+k=n$.
You observed that 
$$\operatorname{Corr}\left(\{a_1,...,a_m\},\{b_1,...,b_m\} \right) \approx 0 $$ 
while 
$$\operatorname{Corr}\left(\{a_{m+1},...,a_n\},\{b_{m+1},...,b_n\} \right) \neq 0 $$ 
What does that tell us? That probably the full sample of $A$ and/or of $B$ realizations does not really come each from the same or from identical random variables. This conclusion holds irrespective of whether your data is cross-sectional or time-series.
This does not mean that each realization does not come from the same real world phenomenon. For a cross sectional example, say $A$ represents "household income". We do not contradict that, but we find evidence that not all household incomes have the same distribution, if viewed as random variables.
Analogously for a time-series, say r.v. $A$ is Gross Domestic Product.  In such a case, it means that this real-world phenomenon at some point in time has changed distribution (and so in mathematical terms, it is no longer the same random variable)...  
OR, that the $B$-sample does not really come from the same distribution.
A: If I'm understanding your question correctly, two possibilities spring to mind:
1) Multivariate adaptive regression splines. In a simple case, it models a piecewise regression slope that looks like a V. Take a look at this image. In this example, the correlation between x and y is smaller in magnitude from $8 \le x \le 14$, but magnitude is much larger  when $x > 14 $. 
2) If you think the sub-dimensions are theoretically meaningful, like two homogeneous sub-populations within your sample, then clustering might also be something worthwhile to pursue.
