optimized putmulti for sets smaller than batch size