Link python array to x-position of element
You can do it with something like that (the code is commented, so I think it is clear):

import bpy  
from mathutils import Vector

scene = bpy.context.scene

# Get the object
obj = bpy.context.object

# Define first frame and frame step
frame = 0  
frame_step = 10

# Your x positions array
x_positions = [0,0.1, 0.5, 0.7]


# Loop over positions
for x in x_positions:

    # Set the current frame
    scene.frame_set( frame )

    # Assign the location
    obj.location.x = x

    # Insert a key frame (replaces old one for this data path)
    obj.keyframe_insert( data_path = 'location' )

    # Go to next frame
    frame += frame_step