Bayesian Filtering for Discrete-Time Systems with Random Structure