I don't think I am reading your requirements correctly. You want to design logic that samples an 8 bit data input, right? Then you need to generate a histogram of the number of occurances of each value possible for the 8 bit data input, right? Then you want to keep a separate histogram for each pixel (in a 2D array of pixels), which means no pixel grouping. So you will end up with 256 result numbers for each pixel, which implies no input vlaue binning. And how many pixels do you want to generate a histogram for?
or - are you trying to generate a simulation stimulus ?