Add array handling to python templates and added repl-docs template for
python.