New perspectives in Statistical Mechanics and High-dimensional Inference