Python : Custom Attribute for Vertices
Thanks to @scurest for answers in comments. Here is my working code now:
import bpy
import numpy

active_obj = bpy.context.active_object

active_obj.data.attributes.new(name='myAttribute', type='FLOAT_VECTOR', domain='POINT')

# set (you could also use numpy.empty)
test = numpy.zeros(len(active_obj.data.vertices) * 3, dtype=numpy.float32)
active_obj.data.attributes['myAttribute'].data.foreach_set('vector', test)

# get (you could also use numpy.empty)
test2 = numpy.zeros(len(active_obj.data.vertices) * 3, dtype=numpy.float32)
active_obj.data.attributes['myAttribute'].data.foreach_get('vector', test2)

Tested in Blender 2.92