Array replacement and comma parsing