* array.c: Have to_h raise on elements that are not key-value pairs [#9239]