Boundary-layer receptivity due to distributed surface imperfections of a deterministic or random nature