Racial subconscious

Racial subconscious, racial memory, or tribal memory, was a psychological theory which posited the existence of certain concepts and ideas which were inherent to a species, such as images representative of good and evil, and those which were considered terrifying.

Tribal memories often formed the basis for proverbs. 

In 2267, upon encountering a series of Gothic imagery clearly meant to frighten Humans, including witches, a black cat, and a dark castle, Commander Spock and Captain Kirk realized that the environment was being created based on the racial memories of Humans as to what would scare them the most. 

Odo, upon musing that no one taught him his sense of justice, speculated that it consituted a racial memory of his species.