Dimension theory of random self-similar and self-affine constructions