[prefix-sharing] Cleaned up old insert methods.
[prefix-sharing] Added possibility to specify the number of array elements to encode.