Update index.js

set array field support
set struct field support
smarter set method (object / embedded object / buffer)
set charsfield append a "\0"