Made array implementation more consistent and improved documentation