In this case it's better going with lower level functions:
\documentclass{article}
\usepackage{xparse,xcolor}
\ExplSyntaxOn
\NewDocumentCommand{\myboxed}{O{white}O{gray}O{white}m}
{
\clist_map_inline:nn { #4 }
{
\andrea_myboxed:nnnn { #1 } { #2 } { #3 } { ##1 }
}
}
\cs_new_protected:Nn \andrea_myboxed:nnnn
{
\fcolorbox{#3}{#2}{\color{#1}#4}
}
\ExplSyntaxOff
\begin{document}
\myboxed{a,b,c}
\end{document}

Note that \clist_map_inline:nn
splits the first argument at commas, removes leading and trailing spaces and loops over the items, passing each of them to the code in the second argument as #1
; here it becomes ##1
because we're in the body of a definition.
Splitting at different characters than a comma can be done with the \seq_set_split:Nnn
function and using \seq_map_inline:Nn
instead. You find several examples on the site.
However, three optional arguments are a nuisance, as if you want to only specify the third one, you have to explicitly give also the first two. A key-value interface is better. The advantage is being able to specify keys in any order, so you just have to remember their names (which is easier than remembering the order of the optional arguments).
\documentclass{article}
\usepackage{xparse,xcolor}
\ExplSyntaxOn
\keys_define:nn { andrea/myboxed }
{
border .tl_set:N = \l__andrea_myboxed_border_tl,
background .tl_set:N = \l__andrea_myboxed_background_tl,
text .tl_set:N = \l__andrea_myboxed_text_tl,
border .initial:n = white,
background .initial:n = gray,
text .initial:n = white,
}
\NewDocumentCommand{\kmyboxed}{O{}m}
{
\group_begin:
\keys_set:nn { andrea/myboxed } { #1 }
\clist_map_inline:nn { #2 }
{
\andrea_myboxed:VVVn
\l__andrea_myboxed_border_tl
\l__andrea_myboxed_background_tl
\l__andrea_myboxed_text_tl
{##1}
}
\group_end:
}
\cs_new_protected:Nn \andrea_myboxed:nnnn
{
\fcolorbox{#3}{#2}{\color{#1}#4}
}
\cs_generate_variant:Nn \andrea_myboxed:nnnn { VVV }
\ExplSyntaxOff
\begin{document}
\kmyboxed{a,b,c}
\kmyboxed[text=red,background=green,border=blue]{a,b,c}
\end{document}

We define some keys, set their initial values and essentially execute the same code as before, but in a group to keep the values unchanged when the particular loop is finished. If the group gets into the way, it's possible to reset the initial values at \keys_set:nn
.
The variant \andrea_myboxed:VVVn
is used to transform the token list variables into braced arguments (with their value between the braces); not essential in this particular application, in others it can be.