Array utils cleaned up and documented.