You have two strategies available.
Strategy 1: replace spaces with some function that you can redefine depending on the current state
\tl_new:N \l_mhchem_input_tl
\tl_set:Nn \l_mhchem_input_tl { a ~ b ~ c } % this would come from a macro argument
\tl_replace_all:Nnn \l_mhchem_input_tl { ~ } { \__mhchem_space_do: }
\tl_map_inline:Nn \l_mhchem_input_tl { whatever with #1 }
Strategy 2: split the token list into a sequence that you can subsequently use.
\seq_new:N \l_mhchem_split_input_seq
\seq_set_split:Nnn \l_mhchem_split_input_seq { ~ } { a ~ b ~ c } % this would come from a macro argument
\seq_use:Nn \l_mhchem_split_input_seq { do something in place of spaces }
With \seq_set_map:NNn
you can set another sequence adding something around the values stored in \l_mhchem_split_input_seq
and use this new sequence.
~
; that's usually what I mean when I need this sort of thing. – Sean Allred Sep 13 '14 at 19:30\tl_replace_all:Nnn
be enough? (I don't know anything aboutmhchem
so probably I'm wrong.) – Manuel Sep 13 '14 at 20:19