int[] addRegion(int[] regions, int regionIndex) {
    int[] newRegions = new int[regions.length + 1];
    System.arraycopy(regions, 0, newRegions, 0, regions.length);
    newRegions[newRegions.length - 1] = regionIndex;
    return newRegions;
  }
Common method for per host and per Location region index updates when a region is moved.
@param serverIndexToLocation             serverIndexToHostIndex or serverIndexToLocationIndex
@param regionsPerLocation                regionsPerHost or regionsPerLocation
@param colocatedReplicaCountsPerLocation colocatedReplicaCountsPerHost or
                                         colocatedReplicaCountsPerRack
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/BalancerClusterState.java