updated array_get and array_set
Merge pull request #6 from Chumper/master

fixed more errors in array_set and array_get, moved some conditions around