filter array values based on possible value definitions