update_batchcontainer function

Updates a batch container by permuting samples according to a shuffling