JS array decoding encoding

tests in progress