This “works”, although I am not happy with the tabulation works in the star printing section:
This is the “pretty” code for reading by humans, and copy-pasting into the VICE emulator:
10 dim g(63,1)
20 print "clearing star positions..."
30 for i = 0 to 63
40 for j = 0 to 1
50 let g(i,j) = 0
60 next j
70 next i
80 print "generating star positions..."
90 for s = 0 to 63
100 x = int(rnd(1)*255)
110 y = int(rnd(1)*255)
120 let g(s,0) = x
130 let g(s,1) = y
140 next s
150 print "printing star positions..."
160 for s = 0 to 63
170 print "x = ";g(s,0);". y = ";g(s,1)
180 next s
Idiomatic Commodore 64 BASIC formatting:
10 DIM G(63,1)
20 PRINT "CLEARING STAR POSITIONS..."
30 FOR I = 0 TO 63
40 FOR J = 0 TO 1
50 LET G(I,J) = 0
60 NEXT J
70 NEXT I
80 PRINT "GENERATING STAR POSITIONS..."
90 FOR S = 0 TO 63
100 X = INT(RND(1)*255)
110 Y = INT(RND(1)*255)
120 LET G(S,0) = X
130 LET G(S,1) = Y
140 NEXT S
150 PRINT "PRINTING STAR POSITIONS..."
160 FOR S = 0 TO 63
170 PRINT "X = ";G(S,0);". Y = ";G(S,1)
180 NEXT S

Click HERE to watch a video of the code running.