Refactor RuntimeMemory.GetArrayElements()

This method copied every element in the array to a new array, so it increases memory consumption, now the method is changed to return ``IEnumerable<StackValue>`` as in most cases we just iterate through elements.

This method is marked as ``Obsolete`` now because it doesn't work well with dictionary. As mostly it is used by built-in functions, I just leave this function there. It should be removed once we confirm the behavior of builtin functions and do cleanup for builtin function implementations.