backport array monkey patches