Yes, you have some scoping problems. For one thing, amt is getting reset to 100 at the start of every draw().
Try this code to see if it’s closer to what you want:
float [] arr;
int amt = 100;
void setup() {
size( 640, 480 );
arr = new float[20];
}
void coord( float [] arr1 ) {
for( int i=0; i<20; i++ ) {
arr1[i] = random( width );
}
}
void draw() {
background( 0 );
if( (frameCount % amt) == 0 ) {
coord( arr );
amt = int(random(100));
}
for( int i=0; i<20; i++ )
circle( arr[i], height/2, 20 );
}