Morphological design of optical cavities for frequency-selective black absorbers