Tensor Modeling Of High-Dimensional Distributions And Nonlinear Functions