A generalized hyperbolic marching technique for three-dimensional supersonic flow with shocks