Like string_decoder but for streaming arrays