Added a set_cells method to update a batch of cells in one go.