1. Map Array to an Element using XSLT
<TargetElement>
<xsl:for-each select="tns:SourceCollection/tns:SourceElement">
<xsl:value-of select="." />
<xsl:if test="position() != last()">
<xsl:value-of select="','"/>
</xsl:if>
</xsl:for-each>
</TargetElement>
<TargetElement>
<xsl:for-each select="tns:SourceCollection/tns:SourceElement">
<xsl:value-of select="." />
<xsl:if test="position() != last()">
<xsl:value-of select="','"/>
</xsl:if>
</xsl:for-each>
</TargetElement>