Range enhancement && pg array test refactor