Rational Design Of Electrode Architectures For Improved Performance Of Li-Metal And Li-Ion Batteries