Consistent usage of Array.isArray()

Parts of the code base where still using instanceof Array and parts where using Array.isArray(). Switched all the found cases to Array.isArray() which is faster for v8 and instanceof Array only checks to left hand inheritance chain to see if the object was made with the Array constructor, this could cause failure in edge cases and when used with the vm module.