Encode encodes all items to their byte slice representation. Returns two slices whose indexes match to the other. The data might be appended to the optional arguments `keys` and `values`.
(codec Codecer, ri *rawItems[K], defaultExpire time.Duration, keys []K, src []any, expires []time.Duration)