Add array foreach loop function with argument
Move array and object printing to jso.c