Two solutions.
(1) The width is set to the widest entry, but an optional argument is provided for modifying it by addition. A second optional argument (in parentheses) is the inner alignment, default center.
\documentclass{article}
\usepackage{xparse}
\ExplSyntaxOn
\NewDocumentCommand{\rimatightboxes}{ O{0pt} D(){c} m }
{
\rima_tightboxes:nnn { #1 } { #2 } { #3 }
}
\seq_new:N \l_rima_input_seq
\seq_new:N \l_rima_boxes_seq
\dim_new:N \l_rima_width_dim
\box_new:N \l_rima_entry_box
\cs_new_protected:Npn \rima_tightboxes:nnn #1 #2 #3
{
\seq_set_split:Nnn \l_rima_input_seq { , } { #3 }
\dim_zero:N \l_rima_width_dim
\seq_map_inline:Nn \l_rima_input_seq
{
\str_if_eq:nnF { ##1 } { \dots }
{
\hbox_set:Nn \l_rima_entry_box { $##1$ }
\dim_set:Nn \l_rima_width_dim
{ \dim_max:nn { \l_rima_width_dim } { \box_wd:N \l_rima_entry_box } }
}
}
\dim_add:Nn \l_rima_width_dim { (#1 + \fboxsep) * 2}
\seq_set_map:NNn \l_rima_boxes_seq \l_rima_input_seq
{
\str_if_eq:nnTF { ##1 } { \dots }
{
\exp_not:n { \framebox[\l_rima_width_dim][#2] { \strut\dotfill } }
}
{
\exp_not:n { \framebox[\l_rima_width_dim][#2] { \strut$##1$ } }
}
}
\seq_use:Nn \l_rima_boxes_seq { \kern-\fboxrule }
}
\ExplSyntaxOff
\begin{document}
\rimatightboxes{b_{0},b_{1},b_{2},\dots,b_{st-1},b_{st}}
\bigskip
\rimatightboxes(l){b_{0},b_{1},b_{2},\dots,b_{st-1},b_{st}}
\bigskip
\rimatightboxes[3pt]{b_{0},b_{1},b_{2},\dots,b_{st-1},b_{st}}
\bigskip
\rimatightboxes[3pt](r){b_{0},b_{1},b_{2},\dots,b_{st-1},b_{st}}
\end{document}
(2) The width is set via an optional argument (default 0.5in). A second optional argument (in parentheses) is the inner alignment, default center.
\documentclass{article}
\usepackage{xparse}
\ExplSyntaxOn
\NewDocumentCommand{\rimaboxes}{ O{0.5in} D(){c} m }
{
\rima_boxes:nnn { #1 } { #2 } { #3 }
}
\seq_new:N \l_rima_input_seq
\seq_new:N \l_rima_boxes_seq
\cs_new_protected:Npn \rima_boxes:nnn #1 #2 #3
{
\seq_set_split:Nnn \l_rima_input_seq { , } { #3 }
\seq_set_map:NNn \l_rima_boxes_seq \l_rima_input_seq
{
\str_if_eq:nnTF { ##1 } { \dots }
{
\exp_not:n { \framebox[#1][#2] { \strut\dotfill } }
}
{
\exp_not:n { \framebox[#1][#2] { \strut$##1$ } }
}
}
\seq_use:Nn \l_rima_boxes_seq { \kern-\fboxrule }
}
\ExplSyntaxOff
\begin{document}
\rimaboxes{b_{0},b_{1},b_{2},\dots,b_{st-1},b_{st}}
\bigskip
\rimaboxes(l){b_{0},b_{1},b_{2},\dots,b_{st-1},b_{st}}
\bigskip
\rimaboxes[.3in]{b_{0},b_{1},b_{2},\dots,b_{st-1},b_{st}}
\bigskip
\rimaboxes[.3in](r){b_{0},b_{1},b_{2},\dots,b_{st-1},b_{st}}
\end{document}
As you see, the last two examples don't really fit.