In this paper, we propose a general framework for the valuation of options in stochastic local volatility (SLV) models with a general correlation structure, which includes the stochastic alpha beta rho (SABR) model and the quadratic SLV model as special cases. Standard stochastic volatility models, such as Heston, Hull-White, Scott, Stein-Stein, alpha-Hypergeometric, 3/2, 4/2, mean-reverting, and Jacobi stochastic volatility models, also fall within this general framework. We propose a novel double-layer continuous-time Markov chain (CTMC) approximation respectively for the variance process and the underlying asset price process. The resulting regime-switching CTMC is further reduced to a single CTMC on an enlarged state space. Closed-form matrix expressions for European options are derived. We also propose a recursive risk-neutral valuation technique for pricing discretely monitored path-dependent options and use it to price Bermudan and barrier options. In addition, we provide single Laplace transform formulae for arithmetic Asian options as well as occupation time derivatives. Numerical examples demonstrate the accuracy and efficiency of the method using several popular SLV models, and reference prices are provided for SABR, Heston-SABR, quadratic SLV, and the Jacobi model.