fixing c++ std::vector and std::array.
changed std::map back to normal pointer, reverted using std::shared_ptr to wrap it.