Spontaneous shape reconfigurations in multicompartmental microcylinders