Refactored HistogramArray