added support for primitive array and moved mapper to different sub package