SERVER-11139 Fix wrong smart pointer used for array allocation