Assuming that you know that your source is producing IID bytes, what you have in this case is a sample from a multinomial distribution with $k=256$. If you have a good idea of the probability of each byte (e.g. 1/256 if they are equiprobable), then you can compute the entropy in the distribution which will grow with $n$ (the size of the array) as suggested in the comments. The formula for the entropy is given in the Wikipedia article.
However, the Shannon entropy could still hide individual probabilities that occur too often for good cryptographic key. Instead you should make sure that the min entropy $H_\infty$ is somewhat greater than the required key size. For equiprobable bytes and for $256|n$, this will be
$$-\log \left(\frac{n!}{\left(\frac n{256}\right)!^{256}}256^{-n}\right)
.$$
Again, this will grow with $n$. Once you have enough min entropy to feel comfortable, just take the byte counts and feed them into your key derivation function of choice.
ETA: @fgrieu asks for a min-entropy formula for more general values of $n$. The following is more cumbersome, but I think that it correctly captures the modal value of the multinomial. For $n=256d+r$ with $0\le r<256$ the formula is
$$-\log \left(\frac{n!}{(d!)^{256-r}((d+1)!)^r}256^{-n}\right)
.$$