When expressing the range of number of persons, goods, etc., うち can be replaced with なか in the following sentence.
兄弟４人のうちで、だらがいちばん背が高いですか。 [Who is the tallest among the four children in your family?]
But うち which expresses the time limitation as follows can not be replaced with なか.
若いうちに、一生懸命勉強したほうがいい。 [You should study hard while you are young.]
暗くならないうちに、山を下りた。 [I came down the mountain before it became dark.]