DO NOT MERGE: fixes #3848: Matcher value for smart variables against array

This relates to feature 3636 which states a couple of changes to the way `lookup_keys` work
I'm creating a PR to get comments of this part of the change and to see that I'm in the right direction