setup array sampling algo to approximate array equality, which is important for knowing when to render a component or not