[4.2] Support : allows array_only to handle dotted keys

Also ensure that an empty array is returned when `$array` or `$keys` arguments are empty