fix array.replace

Signed-off-by: azrael <azrael@imatlas.com>