This is an answer to an old question, but since all the previous answers use counter-based conditionals, I propose, for the sake of completeness, a solution based on redefining macros.
\documentclass[varwidth, border=7pt]{standalone}
\usepackage{pgffor}
\begin{document}
\def\mylist{str1,str2,str3}
\framebox{
\parbox{4em}{%
\foreach[remember=\newline as \mynewline (initially \relax)] \x in \mylist {%
\mynewline\makebox[4em][s]{\x}%
}%
}
}
\end{document}

And the same result can be obtained with classical \def & \gdef.
\documentclass[varwidth, border=7pt]{standalone}
\usepackage{pgffor}
\begin{document}
\def\mylist{str1,str2,str3}
\framebox{
\parbox{4em}{%
\def\mynewline{}%
\foreach \x in \mylist {%
\mynewline\makebox[4em][s]{\x}%
\gdef\mynewline{\newline}%
}%
}
}
\end{document}
Note: the \gdef is need here because \foreach creates a group. If we want to avoid this we can use the first solution or another loop, like \xintFor.
\parboxhas not the ability to spread align. In this question, we just achieve it by manually add\\to ensure spread align only for those lengh shorter than defined width. I wonder if there are solutions to spread align text in \parboxautometically? – lyl Feb 17 '19 at 05:58[s]in\makebox. Ok, I'll post another question to illustrate my meaning. Have a nice evening! – lyl Feb 17 '19 at 06:04