added safe binsplit that uses a mutable (manifest) array as input