get key/value pairs as arrays