You could have a dynamic field with
<field name="prices" type="float" indexed="true" stored="true" multiValued="false"/>
<dynamicField name="price_*" type="float" indexed="true" stored="true" multiValued="true"/>
<copyField source="price_*" dest="prices"/>
<doc>
<str name="price_A">10</str>
<str name="price_B">15</str>
<str name="price_C">30</str>
<arr name="prices">
<str>10</str>
<str>15</str>
<str>30</str>
</arr>
</doc>