immutable primitive array wrapper for Scala