Added allocate_all function to allocate a bunch of boxes at once