You can do several lines without the need to count how long is any item.
\documentclass{article}
\usepackage{booktabs} % better rules
\ExplSyntaxOn
\NewDocumentCommand{\mymacro}{O{\}m}
{% #1 = separator, #2 = data
\fukai_mymacro:nn { #1 } { #2 }
}
\int_new:N \l__fukai_mymacro_length_int
\seq_new:N \l__fukai_mymacro_body_seq
\seq_new:N \l__fukai_mymacro_row_seq
\cs_new_protected:Nn \fukai_mymacro:nn
{
\seq_set_split:Nnn \l__fukai_mymacro_body_seq { #1 } { #2 }
\int_zero:N \l__fukai_mymacro_length_int
\seq_map_inline:Nn \l__fukai_mymacro_body_seq
{
\int_compare:nT { \l__fukai_mymacro_length_int < \tl_count:n { ##1 } }
{
\int_set:Nn \l__fukai_mymacro_length_int { \tl_count:n { ##1 } }
}
}
\begin{array}{ * { \l__fukai_mymacro_length_int } { c } }
\seq_map_indexed_function:NN \l__fukai_mymacro_body_seq __fukai_mymacro_row:nn
\end{array}
}
\cs_new_protected:Nn __fukai_mymacro_row:nn
{% #1 is the index, #2 is the item
\int_compare:nF { #1 = 1 } { \ \midrule }
\seq_set_split:Nnn \l__fukai_mymacro_row_seq { } { #2 }
\seq_use:Nn \l__fukai_mymacro_row_seq { & }
}
\ExplSyntaxOff
\begin{document}
[
\mymacro{abc \ def }
]
[
\mymacro{abcde \ fg \ uvw}
]
[
\mymacro[,]{ab,def}
]
\end{document}
The row separator is, by default \\, but it can be set differently with the optional argument.
The argument is split at the chosen separator; then each item's length is computed to determine the number of columns. Next each row is produced by splitting “at nothing”.

If all your tables have just two rows, you can do in a similar way.
\documentclass{article}
\usepackage{booktabs} % better rules
\ExplSyntaxOn
\NewDocumentCommand{\mymacro}{mm}
{
\fukai_mymacro:nn { #1 } { #2 }
}
\seq_new:N \l__fukai_mymacro_row_seq
\cs_new_protected:Nn \fukai_mymacro:nn
{
\begin{array}
{
* { \int_max:nn { \tl_count:n { #1 } } { \tl_count:n { #2 } } } { c }
}
\seq_set_split:Nnn \l__fukai_mymacro_row_seq { } { #1 }
\seq_use:Nn \l__fukai_mymacro_row_seq { & }
\ \midrule
\seq_set_split:Nnn \l__fukai_mymacro_row_seq { } { #2 }
\seq_use:Nn \l__fukai_mymacro_row_seq { & }
\end{array}
}
\ExplSyntaxOff
\begin{document}
[
\mymacro{abc}{def}
]
[
\mymacro{abcde}{uvw}
]
[
\mymacro{ab}{def}
]
\end{document}
